diff options
Diffstat (limited to 'comms/linpsk/files')
-rw-r--r-- | comms/linpsk/files/patch-gui_crxdisplay.cpp | 13 | ||||
-rw-r--r-- | comms/linpsk/files/patch-gui_linpsk.cpp | 22 | ||||
-rw-r--r-- | comms/linpsk/files/patch-src_csound.cpp | 80 | ||||
-rw-r--r-- | comms/linpsk/files/patch-src_csound.h | 19 | ||||
-rw-r--r-- | comms/linpsk/files/patch-src_textinput.cpp | 11 | ||||
-rw-r--r-- | comms/linpsk/files/patch-src_waveinput.cpp | 11 |
6 files changed, 0 insertions, 156 deletions
diff --git a/comms/linpsk/files/patch-gui_crxdisplay.cpp b/comms/linpsk/files/patch-gui_crxdisplay.cpp deleted file mode 100644 index fd5a2666f7cb..000000000000 --- a/comms/linpsk/files/patch-gui_crxdisplay.cpp +++ /dev/null @@ -1,13 +0,0 @@ -Fix bogus pointer comparison. - ---- gui/crxdisplay.cpp.orig 2017-01-22 12:03:47 UTC -+++ gui/crxdisplay.cpp -@@ -98,7 +98,7 @@ bool CRxDisplay::start_process_loop() - } - else - Sound = new CSound ( settings.serial ); -- if ( Sound <= NULL ) -+ if ( !Sound ) - return false; - - connect ( Sound, SIGNAL ( samplesAvailable() ), this, SLOT ( process_rxdata() ) ); diff --git a/comms/linpsk/files/patch-gui_linpsk.cpp b/comms/linpsk/files/patch-gui_linpsk.cpp deleted file mode 100644 index 6617d43ef596..000000000000 --- a/comms/linpsk/files/patch-gui_linpsk.cpp +++ /dev/null @@ -1,22 +0,0 @@ -Fix bogus pointer comparison. - ---- gui/linpsk.cpp.orig 2017-01-22 12:03:55 UTC -+++ gui/linpsk.cpp -@@ -387,7 +387,7 @@ void LinPSK::startTx() - Info = "BPSK"; - break; - } -- if ( Sound <= NULL ) // Only create Sound Device once for output -+ if ( !Sound ) // Only create Sound Device once for output - { - if ( settings.DemoMode ) - { -@@ -401,7 +401,7 @@ void LinPSK::startTx() - Sound = new CSound ( settings.serial ); - connect ( Sound, SIGNAL ( samplesAvailable() ), this, SLOT ( process_txdata() ) ); - } -- if ( Sound <= NULL ) -+ if ( !Sound ) - { - QMessageBox::critical ( 0, " Programm Error! LinPsk", "Could not create Sound Device for Output" ); - TxDisplay->TxFunctions->setStatus ( ON ); diff --git a/comms/linpsk/files/patch-src_csound.cpp b/comms/linpsk/files/patch-src_csound.cpp deleted file mode 100644 index e9683dd3f7c0..000000000000 --- a/comms/linpsk/files/patch-src_csound.cpp +++ /dev/null @@ -1,80 +0,0 @@ ---- src/csound.cpp.orig 2013-12-24 23:45:41.000000000 -0800 -+++ src/csound.cpp 2015-01-09 11:00:21.000000000 -0800 -@@ -21,7 +21,7 @@ - - using namespace std; - extern Parameter settings; --CSound::CSound ( int ptt = -1 ) : Input ( ptt ) -+CSound::CSound ( int ptt ) : Input ( ptt ) - { - started = false; - output = false; -@@ -41,7 +41,13 @@ - return 0; - if ( anzahl > available ) - return 0; -- memcpy ( sample, &buffer[readPointer], anzahl*sizeof ( double ) ) ; -+ for (int i=0; i<anzahl; i++) { -+ sample[i] = (double)buffer[readPointer+i] / 0x7fffffff; -+ if (sample[i] < -1.0) -+ sample[i] = -1.0; -+ else if(sample[i] > 1.0) -+ sample[i] = 1.0; -+ } - LockPointers.lock(); - available -= anzahl; - free += anzahl; -@@ -101,10 +107,10 @@ - return false; - } - /* Set the sample format */ -- err = snd_pcm_hw_params_set_format ( handle, hwparams, SND_PCM_FORMAT_FLOAT_LE ); -+ err = snd_pcm_hw_params_set_format ( handle, hwparams, SND_PCM_FORMAT_S32 ); - if ( err < 0 ) - { -- *errorstring = QString ( "Sample format Float not available : " ) + QString ( snd_strerror ( err ) ); -+ *errorstring = QString ( "Sample format Signed 32-bit not available : " ) + QString ( snd_strerror ( err ) ); - return false; - } - /* Set the count of channels, most soundcards only support stereo */ -@@ -229,10 +235,10 @@ - return false; - } - /* Set the sample format */ -- err = snd_pcm_hw_params_set_format ( handle, hwparams, SND_PCM_FORMAT_FLOAT_LE ); -+ err = snd_pcm_hw_params_set_format ( handle, hwparams, SND_PCM_FORMAT_S32 ); - if ( err < 0 ) - { -- *errorstring = QString ( "Sample format Float not available : " ) + QString ( snd_strerror ( err ) ); -+ *errorstring = QString ( "Sample format Signed 32-bit not available : " ) + QString ( snd_strerror ( err ) ); - return false; - } - /* Set the count of channels */ -@@ -305,7 +311,8 @@ - { - if ( anzahl <= free ) - { -- memcpy ( &buffer[freePointer], sample, anzahl*sizeof ( double ) ); -+ for (int i=0; i<anzahl; i++) -+ buffer[freePointer+i] = sample[i] * 0x7fffffff; - LockPointers.lock(); - toBePlayed += anzahl; - free -= anzahl; -@@ -394,7 +401,7 @@ - void CSound::record() - { - int toBeRead, err; -- float SampleBuffer[256]; -+ int32_t SampleBuffer[256]; - qDebug ( "Start recording" ); - while ( started ) - { -@@ -447,7 +454,7 @@ - - void CSound::play() - { -- float SampleBuffer[256], x; -+ int32_t SampleBuffer[256], x; - bool signaled; - int err, laenge; - laenge = 128; diff --git a/comms/linpsk/files/patch-src_csound.h b/comms/linpsk/files/patch-src_csound.h deleted file mode 100644 index d2cd129171e5..000000000000 --- a/comms/linpsk/files/patch-src_csound.h +++ /dev/null @@ -1,19 +0,0 @@ ---- src/csound.h.orig 2013-12-24 23:45:41.000000000 -0800 -+++ src/csound.h 2015-01-07 07:38:09.000000000 -0800 -@@ -22,6 +22,7 @@ - #include <fcntl.h> - #include <sys/types.h> - #include <sys/stat.h> -+#include <inttypes.h> - - #include <QMutex> - #include <QWaitCondition> -@@ -49,7 +50,7 @@ - private: // Private attributes - snd_pcm_t *handle; - bool output; -- double buffer[2*BUF_SIZE]; // 16 bit , stereo -+ int32_t buffer[2*BUF_SIZE]; // 16 bit , stereo - QMutex LockPointers; - QWaitCondition WakeUp; - void record(); diff --git a/comms/linpsk/files/patch-src_textinput.cpp b/comms/linpsk/files/patch-src_textinput.cpp deleted file mode 100644 index b6ac51915ff4..000000000000 --- a/comms/linpsk/files/patch-src_textinput.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- src/textinput.cpp.orig 2015-01-07 06:35:27.000000000 -0800 -+++ src/textinput.cpp 2015-01-07 06:35:36.000000000 -0800 -@@ -22,7 +22,7 @@ - extern Parameter settings; - extern int errno; - --TextInput::TextInput ( int ptt = -1 ) : Input ( ptt ) -+TextInput::TextInput ( int ptt ) : Input ( ptt ) - { - } - TextInput::~TextInput() diff --git a/comms/linpsk/files/patch-src_waveinput.cpp b/comms/linpsk/files/patch-src_waveinput.cpp deleted file mode 100644 index 56582c307a32..000000000000 --- a/comms/linpsk/files/patch-src_waveinput.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- src/waveinput.cpp.orig 2015-01-07 06:36:15.000000000 -0800 -+++ src/waveinput.cpp 2015-01-07 06:36:25.000000000 -0800 -@@ -19,7 +19,7 @@ - - extern Parameter settings; - --WaveInput::WaveInput(int ptt = -1): Input(ptt) -+WaveInput::WaveInput(int ptt): Input(ptt) - { - EightBits=false; - } |