diff --git a/plugins/channelrx/demodssb/ssbdemod.cpp b/plugins/channelrx/demodssb/ssbdemod.cpp index 38e5c51d7..e75b562a4 100644 --- a/plugins/channelrx/demodssb/ssbdemod.cpp +++ b/plugins/channelrx/demodssb/ssbdemod.cpp @@ -405,7 +405,7 @@ void SSBDemod::applyAudioSampleRate(int sampleRate) if (m_agcNbSamples != agcNbSamples) { - m_agc.resize(agcNbSamples, std::min(sampleRate/20, agcNbSamples/2), agcTarget); + m_agc.resize(agcNbSamples, agcNbSamples/2, agcTarget); m_agc.setStepDownDelay(agcNbSamples); m_agcNbSamples = agcNbSamples; } @@ -503,7 +503,7 @@ void SSBDemod::applySettings(const SSBDemodSettings& settings, bool force) if (m_agcNbSamples != agcNbSamples) { m_settingsMutex.lock(); - m_agc.resize(agcNbSamples, std::min((int)m_audioSampleRate/20, agcNbSamples/2), agcTarget); + m_agc.resize(agcNbSamples, agcNbSamples/2, agcTarget); m_agc.setStepDownDelay(agcNbSamples); m_agcNbSamples = agcNbSamples; m_settingsMutex.unlock();