- 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
This commit is contained in:
Diane Bruce 2006-01-16 02:02:46 +00:00
parent 491cb12eec
commit bb6f33ec5c
1 changed files with 4 additions and 6 deletions

View File

@ -166,8 +166,8 @@ static int SoundOut( void *inputBuffer, void *outputBuffer,
TxOKz=*data->TxOK;
*data->Transmitting=*data->TxOK;
for(i=0 ; i<framesPerBuffer; i++ ) {
if(*data->TxOK) {
if(*data->TxOK) {
for(i=0 ; i<framesPerBuffer; i++ ) {
n2=data->iwave[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;