From c31a34ea41d0f7eff8b4bdf6994938f6259a9a0c Mon Sep 17 00:00:00 2001 From: f4exb Date: Tue, 29 May 2018 10:59:30 +0200 Subject: [PATCH] BFM demod: code cosmetic changes --- plugins/channelrx/demodbfm/bfmdemod.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/plugins/channelrx/demodbfm/bfmdemod.cpp b/plugins/channelrx/demodbfm/bfmdemod.cpp index f9836e411..7dd65ee6d 100644 --- a/plugins/channelrx/demodbfm/bfmdemod.cpp +++ b/plugins/channelrx/demodbfm/bfmdemod.cpp @@ -135,11 +135,9 @@ void BFMDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto for (int i =0 ; i m_magsqPeak) - { + if (msq > m_magsqPeak) { m_magsqPeak = msq; } @@ -246,12 +244,11 @@ void BFMDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto ++m_audioBufferFill; - if(m_audioBufferFill >= m_audioBuffer.size()) + if (m_audioBufferFill >= m_audioBuffer.size()) { uint res = m_audioFifo.write((const quint8*)&m_audioBuffer[0], m_audioBufferFill, 1); - if(res != m_audioBufferFill) - { + if(res != m_audioBufferFill) { qDebug("BFMDemod::feed: %u/%u audio samples written", res, m_audioBufferFill); } @@ -263,20 +260,18 @@ void BFMDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto } } - if(m_audioBufferFill > 0) + if (m_audioBufferFill > 0) { uint res = m_audioFifo.write((const quint8*)&m_audioBuffer[0], m_audioBufferFill, 1); - if(res != m_audioBufferFill) - { + if (res != m_audioBufferFill) { qDebug("BFMDemod::feed: %u/%u tail samples written", res, m_audioBufferFill); } m_audioBufferFill = 0; } - if(m_sampleSink != 0) - { + if (m_sampleSink != 0) { m_sampleSink->feed(m_sampleBuffer.begin(), m_sampleBuffer.end(), true); }