mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-26 09:48:45 -05:00
BFM demod: code cosmetic changes
This commit is contained in:
parent
f3aa41d76c
commit
c31a34ea41
@ -135,11 +135,9 @@ void BFMDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto
|
|||||||
for (int i =0 ; i <rf_out; i++)
|
for (int i =0 ; i <rf_out; i++)
|
||||||
{
|
{
|
||||||
msq = rf[i].real()*rf[i].real() + rf[i].imag()*rf[i].imag();
|
msq = rf[i].real()*rf[i].real() + rf[i].imag()*rf[i].imag();
|
||||||
|
|
||||||
m_magsqSum += msq;
|
m_magsqSum += msq;
|
||||||
|
|
||||||
if (msq > m_magsqPeak)
|
if (msq > m_magsqPeak) {
|
||||||
{
|
|
||||||
m_magsqPeak = msq;
|
m_magsqPeak = msq;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -250,8 +248,7 @@ void BFMDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto
|
|||||||
{
|
{
|
||||||
uint res = m_audioFifo.write((const quint8*)&m_audioBuffer[0], m_audioBufferFill, 1);
|
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);
|
qDebug("BFMDemod::feed: %u/%u audio samples written", res, m_audioBufferFill);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -267,16 +264,14 @@ void BFMDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto
|
|||||||
{
|
{
|
||||||
uint res = m_audioFifo.write((const quint8*)&m_audioBuffer[0], m_audioBufferFill, 1);
|
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);
|
qDebug("BFMDemod::feed: %u/%u tail samples written", res, m_audioBufferFill);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_audioBufferFill = 0;
|
m_audioBufferFill = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(m_sampleSink != 0)
|
if (m_sampleSink != 0) {
|
||||||
{
|
|
||||||
m_sampleSink->feed(m_sampleBuffer.begin(), m_sampleBuffer.end(), true);
|
m_sampleSink->feed(m_sampleBuffer.begin(), m_sampleBuffer.end(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user