diff --git a/plugins/channeltx/modam/ammod.cpp b/plugins/channeltx/modam/ammod.cpp index 1c902ab44..dc2b92601 100644 --- a/plugins/channeltx/modam/ammod.cpp +++ b/plugins/channeltx/modam/ammod.cpp @@ -68,7 +68,6 @@ AMMod::AMMod(DeviceSinkAPI *deviceAPI) : m_cwKeyer.setSampleRate(m_settings.m_audioSampleRate); m_cwKeyer.setWPM(13); m_cwKeyer.setMode(CWKeyer::CWNone); - m_cwSmoother.setNbFadeSamples(192); // 4 ms @ 48 kHz m_channelizer = new UpChannelizer(this); m_threadedChannelizer = new ThreadedBasebandSampleSource(m_channelizer, this); @@ -200,12 +199,12 @@ void AMMod::pullAF(Real& sample) if (m_cwKeyer.getSample()) { - m_cwSmoother.getFadeSample(true, fadeFactor); + m_cwKeyer.getCWSmoother().getFadeSample(true, fadeFactor); sample = m_toneNco.next() * fadeFactor; } else { - if (m_cwSmoother.getFadeSample(false, fadeFactor)) + if (m_cwKeyer.getCWSmoother().getFadeSample(false, fadeFactor)) { sample = m_toneNco.next() * fadeFactor; } @@ -427,7 +426,6 @@ void AMMod::applySettings(const AMModSettings& settings, bool force) if ((settings.m_audioSampleRate != m_settings.m_audioSampleRate) || force) { m_cwKeyer.setSampleRate(settings.m_audioSampleRate); - m_cwSmoother.setNbFadeSamples(settings.m_audioSampleRate / 250); // 4 ms } m_settings = settings; diff --git a/plugins/channeltx/modam/ammod.h b/plugins/channeltx/modam/ammod.h index 346a97da7..220c4a0b0 100644 --- a/plugins/channeltx/modam/ammod.h +++ b/plugins/channeltx/modam/ammod.h @@ -289,7 +289,6 @@ private: Real m_peakLevel; Real m_levelSum; CWKeyer m_cwKeyer; - CWSmoother m_cwSmoother; static const int m_levelNbSamples; diff --git a/plugins/channeltx/modnfm/nfmmod.cpp b/plugins/channeltx/modnfm/nfmmod.cpp index 3f5c31918..1aebc616c 100644 --- a/plugins/channeltx/modnfm/nfmmod.cpp +++ b/plugins/channeltx/modnfm/nfmmod.cpp @@ -73,7 +73,6 @@ NFMMod::NFMMod(DeviceSinkAPI *deviceAPI) : m_cwKeyer.setSampleRate(m_settings.m_audioSampleRate); m_cwKeyer.setWPM(13); m_cwKeyer.setMode(CWKeyer::CWNone); - m_cwSmoother.setNbFadeSamples(192); // 2 ms @ 48 kHz m_channelizer = new UpChannelizer(this); m_threadedChannelizer = new ThreadedBasebandSampleSource(m_channelizer, this); @@ -214,12 +213,12 @@ void NFMMod::pullAF(Real& sample) if (m_cwKeyer.getSample()) { - m_cwSmoother.getFadeSample(true, fadeFactor); + m_cwKeyer.getCWSmoother().getFadeSample(true, fadeFactor); sample = m_toneNco.next() * fadeFactor; } else { - if (m_cwSmoother.getFadeSample(false, fadeFactor)) + if (m_cwKeyer.getCWSmoother().getFadeSample(false, fadeFactor)) { sample = m_toneNco.next() * fadeFactor; } @@ -448,7 +447,6 @@ void NFMMod::applySettings(const NFMModSettings& settings, bool force) if ((settings.m_audioSampleRate != m_settings.m_audioSampleRate) || force) { m_cwKeyer.setSampleRate(settings.m_audioSampleRate); - m_cwSmoother.setNbFadeSamples(settings.m_audioSampleRate / 250); // 4 ms } if ((settings.m_ctcssIndex != m_settings.m_ctcssIndex) || diff --git a/plugins/channeltx/modnfm/nfmmod.h b/plugins/channeltx/modnfm/nfmmod.h index 058429f80..f334b4994 100644 --- a/plugins/channeltx/modnfm/nfmmod.h +++ b/plugins/channeltx/modnfm/nfmmod.h @@ -295,7 +295,6 @@ private: Real m_peakLevel; Real m_levelSum; CWKeyer m_cwKeyer; - CWSmoother m_cwSmoother; static const int m_levelNbSamples; //void apply(); diff --git a/plugins/channeltx/modwfm/wfmmod.cpp b/plugins/channeltx/modwfm/wfmmod.cpp index 8386bb1be..62841c786 100644 --- a/plugins/channeltx/modwfm/wfmmod.cpp +++ b/plugins/channeltx/modwfm/wfmmod.cpp @@ -81,7 +81,6 @@ WFMMod::WFMMod(DeviceSinkAPI *deviceAPI) : // CW keyer m_cwKeyer.setSampleRate(m_settings.m_outputSampleRate); - m_cwSmoother.setNbFadeSamples(m_settings.m_outputSampleRate / 250); // 4 ms m_cwKeyer.setWPM(13); m_cwKeyer.setMode(CWKeyer::CWNone); m_cwKeyer.reset(); @@ -223,13 +222,13 @@ void WFMMod::pullAF(Complex& sample) if (m_cwKeyer.getSample()) { - m_cwSmoother.getFadeSample(true, fadeFactor); + m_cwKeyer.getCWSmoother().getFadeSample(true, fadeFactor); sample.real(m_toneNcoRF.next() * m_settings.m_volumeFactor * fadeFactor); sample.imag(0.0f); } else { - if (m_cwSmoother.getFadeSample(false, fadeFactor)) + if (m_cwKeyer.getCWSmoother().getFadeSample(false, fadeFactor)) { sample.real(m_toneNcoRF.next() * m_settings.m_volumeFactor * fadeFactor); sample.imag(0.0f); @@ -470,7 +469,6 @@ void WFMMod::applySettings(const WFMModSettings& settings, bool force) if ((settings.m_outputSampleRate != m_settings.m_outputSampleRate) || force) { m_cwKeyer.setSampleRate(settings.m_outputSampleRate); - m_cwSmoother.setNbFadeSamples(settings.m_outputSampleRate / 250); // 4 ms m_cwKeyer.reset(); } diff --git a/plugins/channeltx/modwfm/wfmmod.h b/plugins/channeltx/modwfm/wfmmod.h index bf9af824d..00d08d3ef 100644 --- a/plugins/channeltx/modwfm/wfmmod.h +++ b/plugins/channeltx/modwfm/wfmmod.h @@ -298,7 +298,6 @@ private: Real m_peakLevel; Real m_levelSum; CWKeyer m_cwKeyer; - CWSmoother m_cwSmoother; static const int m_levelNbSamples; void applySettings(const WFMModSettings& settings, bool force = false);