1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-07 16:34:45 -04:00

NFM demod: af squeelch optimization

This commit is contained in:
f4exb
2017-05-13 12:10:03 +02:00
parent 68f742fad7
commit f57eecee86
3 changed files with 30 additions and 17 deletions
+6
View File
@@ -91,6 +91,12 @@ void AFSquelch::setCoefficients(int N, unsigned int nbAvg, int _samplerate, int
m_samplesAttack = _samplesAttack;
m_samplesDecay = _samplesDecay;
m_movingAverages.resize(m_nTones, MovingAverage<double>(m_nbAvg, 1.0));
m_samplesProcessed = 0;
m_maxPowerIndex = 0;
m_attackCount = 0;
m_decayCount = 0;
m_isOpen = false;
m_threshold = 0.0;
// for each of the frequencies (tones) of interest calculate
// k and the associated filter coefficient as per the Goertzel