From 09094b3b28391b50879c78a199ce7be02fb2b937 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sun, 30 Oct 2016 20:19:18 +0000 Subject: [PATCH] Don't use soft keying with CW iD in fast modes. (I don't understand why this was needed...) git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7266 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- Modulator.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Modulator.cpp b/Modulator.cpp index 6a1e6e1bd..6a3794755 100644 --- a/Modulator.cpp +++ b/Modulator.cpp @@ -195,14 +195,19 @@ qint64 Modulator::readData (char * data, qint64 maxSize) if (m_phi > m_twoPi) m_phi -= m_twoPi; qint16 sample=0; float amp=32767.0; + float x=0; if(m_ramp!=0) { - float x=qSin(float(m_phi)); + x=qSin(float(m_phi)); if(SOFT_KEYING) { amp=qAbs(qint32(m_ramp)); if(amp>32767.0) amp=32767.0; } sample=round(amp*x); } + if(m_bFastMode) { + sample=0; + if(level) sample=32767.0*x; + } if (int (j) <= icw[0] && j < NUM_CW_SYMBOLS) { // stop condition samples = load (postProcessSample (sample), samples); ++framesGenerated;