diff --git a/plugins/channelrx/demodam/amdemod.h b/plugins/channelrx/demodam/amdemod.h index 17d5178a9..ca7b11697 100644 --- a/plugins/channelrx/demodam/amdemod.h +++ b/plugins/channelrx/demodam/amdemod.h @@ -160,6 +160,10 @@ private: { if (m_squelchCount <= m_running.m_audioSampleRate / 10) { + if (m_squelchCount == m_running.m_audioSampleRate / 20) { + m_volumeAGC.fill(1.0); + } + m_squelchCount++; } } diff --git a/sdrbase/dsp/agc.h b/sdrbase/dsp/agc.h index 3db6f99ef..52f0d2011 100644 --- a/sdrbase/dsp/agc.h +++ b/sdrbase/dsp/agc.h @@ -85,6 +85,11 @@ public: m_moving_average.resize(historySize, initial); } + void fill(double value) + { + m_moving_average.fill(value); + } + Real getValue() { if (m_moving_average.average() > m_clip)