diff --git a/WSJT-X_Users_Guide.docx b/WSJT-X_Users_Guide.docx index 2669d63bc..ee5376d0e 100644 Binary files a/WSJT-X_Users_Guide.docx and b/WSJT-X_Users_Guide.docx differ diff --git a/mainwindow.cpp b/mainwindow.cpp index 7cf4e8a62..2ae5c051b 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1,4 +1,4 @@ -//------------------------------------------------------------ MainWindow +//------------------------------------------------------------- MainWindow #include "mainwindow.h" #include "ui_mainwindow.h" #include "devsetup.h" diff --git a/soundout.cpp b/soundout.cpp index 759595956..5728c8a65 100644 --- a/soundout.cpp +++ b/soundout.cpp @@ -41,6 +41,7 @@ extern "C" int d2aCallback(const void *inputBuffer, void *outputBuffer, static double freq; static double snr; static double fac; + static double amp; static int ic=0,j=0; static short int i2; int isym,nspd; @@ -50,7 +51,7 @@ extern "C" int d2aCallback(const void *inputBuffer, void *outputBuffer, // Time according to this computer qint64 ms = QDateTime::currentMSecsSinceEpoch() % 86400000; int mstr = ms % (1000*udata->ntrperiod ); - if(mstr<1000) return 0; + if(mstr<1000) return paContinue; ic=(mstr-1000)*48; udata->bRestart=false; srand(mstr); //Initialize random seed @@ -74,7 +75,7 @@ extern "C" int d2aCallback(const void *inputBuffer, void *outputBuffer, phi += dphi; if(phi>twopi) phi -= twopi; i2=32767.0*sin(phi); - j=(ic-ic0)/nspd; + j=(ic-ic0)/nspd + 1; if(icw[j]==0) i2=0; if(udata->txsnrdb < 0.0) { int i4=fac*(gran() + i2*snr/32768.0); @@ -89,24 +90,21 @@ extern "C" int d2aCallback(const void *inputBuffer, void *outputBuffer, #endif ic++; } + if(j>icw[0]) return paComplete; return paContinue; } - if(isym>=85 and icw[0]>=0) { -// qDebug() << "C" << isym << icw[0]; - return paComplete; - } baud=12000.0/udata->nsps; freq=udata->ntxfreq + itone[isym]*baud; dphi=twopi*freq/48000.0; - double amp=32767.0; + amp=32767.0; int i0=84.983*4.0*udata->nsps; + int i1=85*4*udata->nsps; for(uint i=0 ; itwopi) phi -= twopi; - if(ic>i0) { - amp=0.98*amp; - } + if(ic>i0) amp=0.98*amp; + if(ic>i1) amp=0.0; i2=amp*sin(phi); if(udata->txsnrdb < 0.0) { int i4=fac*(gran() + i2*snr/32768.0); @@ -121,9 +119,9 @@ extern "C" int d2aCallback(const void *inputBuffer, void *outputBuffer, #endif ic++; } - if(amp<1.0 and icw[0]==0) { -// qDebug() << "A" << isym << amp << icw[0]; - return paComplete; + if(amp==0.0) { + if(icw[0]==0) return paComplete; + phi=0.0; } return paContinue; } @@ -192,7 +190,6 @@ void SoundOutThread::run() qint64 ms = QDateTime::currentMSecsSinceEpoch(); m_SamFacOut=udata.ncall*FRAMES_PER_BUFFER*1000.0/(48000.0*(ms-ms0-50)); } - //qDebug() << "btxok = " << btxok << "btxMute = " << btxMute; msleep(100); } Pa_StopStream(outStream);