From 200199c5d492123ee95c2a56ae28d5c1c5d986c8 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 29 Apr 2020 20:59:48 +0100 Subject: [PATCH] Reduce the CPU load slightly. --- FM.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/FM.cpp b/FM.cpp index 2258109..fd18f11 100644 --- a/FM.cpp +++ b/FM.cpp @@ -81,17 +81,15 @@ void CFM::samples(bool cos, q15_t* samples, uint8_t length) stateMachine(validCTCSS && cos, i + 1U); } - currentSample = m_deemphasis.filter(currentSample); - // Only let audio through when relaying audio if (m_state == FS_RELAYING || m_state == FS_KERCHUNK) { + currentSample = m_deemphasis.filter(currentSample); m_downsampler.addSample(currentSample); currentSample = m_blanking.process(currentSample); - } - else + currentSample *= m_rfAudioBoost; + } else { currentSample = 0U; - - currentSample *= m_rfAudioBoost; + } if (!m_callsign.isRunning()) currentSample += m_rfAck.getHighAudio();