From 67f318e6edd453db2ab68f072efe4346b409ca16 Mon Sep 17 00:00:00 2001 From: f4exb Date: Fri, 12 May 2017 04:42:06 +0200 Subject: [PATCH] AM demod: restored squelch attack and decay --- plugins/channelrx/demodam/amdemod.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/channelrx/demodam/amdemod.h b/plugins/channelrx/demodam/amdemod.h index 9ef7ad2a5..17d5178a9 100644 --- a/plugins/channelrx/demodam/amdemod.h +++ b/plugins/channelrx/demodam/amdemod.h @@ -184,8 +184,8 @@ private: m_volumeAGC.feed(demod); demod /= m_volumeAGC.getValue(); - sample = (0.5 - demod) * 2048 * m_running.m_volume; -// Real attack = (m_squelchCount - (m_running.m_audioSampleRate / 20)) / (Real) (m_running.m_audioSampleRate / 20); + Real attack = m_squelchCount / (0.1f * m_running.m_audioSampleRate); + sample = (0.5 - demod) * attack * 2048 * m_running.m_volume; // demod *= ((0.003 * attack) / m_volumeAGC.getValue()); // sample = demod * 32700 * 16; m_squelchOpen = true;