From bb6f33ec5c0e3a15f30c5ca008ded03058197812 Mon Sep 17 00:00:00 2001 From: Diane Bruce Date: Mon, 16 Jan 2006 02:02:46 +0000 Subject: [PATCH] - change the if logic a bit to match start_oss.c and use memset(). git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/trunk@111 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- jtaudio.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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;