diff --git a/jtaudio.c b/jtaudio.c index db8b1f6c8..cc2a53a36 100644 --- a/jtaudio.c +++ b/jtaudio.c @@ -166,8 +166,8 @@ static int SoundOut( void *inputBuffer, void *outputBuffer, TxOKz=*data->TxOK; *data->Transmitting=*data->TxOK; - for(i=0 ; iTxOK) { + if(*data->TxOK) { + for(i=0 ; iiwave[ic]; addnoise_(&n2); *wptr++ = n2; //left @@ -179,10 +179,8 @@ static int SoundOut( void *inputBuffer, void *outputBuffer, *data->TxOK=0; } } - else { - *wptr++ = 0; //left - *wptr++ = 0; //right - } + } else { + memset((void*)outputBuffer, 0, 2*sizeof(int16_t)*framesPerBuffer); } fivehztx_(); //Call fortran routine return 0;