mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-16 05:11:49 -05:00
AM demod: fill AGC average with ones when passing squelch threshold to avoid abrupt start at squelch opening
This commit is contained in:
parent
f7373e8273
commit
6b4ba98e8e
@ -160,6 +160,10 @@ private:
|
|||||||
{
|
{
|
||||||
if (m_squelchCount <= m_running.m_audioSampleRate / 10)
|
if (m_squelchCount <= m_running.m_audioSampleRate / 10)
|
||||||
{
|
{
|
||||||
|
if (m_squelchCount == m_running.m_audioSampleRate / 20) {
|
||||||
|
m_volumeAGC.fill(1.0);
|
||||||
|
}
|
||||||
|
|
||||||
m_squelchCount++;
|
m_squelchCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -85,6 +85,11 @@ public:
|
|||||||
m_moving_average.resize(historySize, initial);
|
m_moving_average.resize(historySize, initial);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void fill(double value)
|
||||||
|
{
|
||||||
|
m_moving_average.fill(value);
|
||||||
|
}
|
||||||
|
|
||||||
Real getValue()
|
Real getValue()
|
||||||
{
|
{
|
||||||
if (m_moving_average.average() > m_clip)
|
if (m_moving_average.average() > m_clip)
|
||||||
|
Loading…
Reference in New Issue
Block a user