Browse Source

DSP device sink engine: simplify code for single channel source handling

chirpmodem-v8.0.0
f4exb 9 years ago
parent
commit
8801462f96
  1. 14
      sdrbase/dsp/dspdevicesinkengine.cpp

14
sdrbase/dsp/dspdevicesinkengine.cpp

@ -178,15 +178,11 @@ void DSPDeviceSinkEngine::work(int nbWriteSamples) @@ -178,15 +178,11 @@ void DSPDeviceSinkEngine::work(int nbWriteSamples)
if ((m_threadedBasebandSampleSources.size() + m_basebandSampleSources.size()) == 1)
{
// qDebug("DSPDeviceSinkEngine::work: single channel source handling");
for (ThreadedBasebandSampleSources::iterator it = m_threadedBasebandSampleSources.begin(); it != m_threadedBasebandSampleSources.end(); ++it)
{
(*it)->feed(sampleFifo, nbWriteSamples);
}
for (BasebandSampleSources::iterator it = m_basebandSampleSources.begin(); it != m_basebandSampleSources.end(); ++it)
{
(*it)->feed(sampleFifo, nbWriteSamples);
}
if (m_threadedBasebandSampleSources.size() == 1) {
m_threadedBasebandSampleSources.back()->feed(sampleFifo, nbWriteSamples);
} else if (m_basebandSampleSources.size() == 1) {
m_basebandSampleSources.back()->feed(sampleFifo, nbWriteSamples);
}
}
// multiple channel sources handling
else if ((m_threadedBasebandSampleSources.size() + m_basebandSampleSources.size()) > 1)

Loading…
Cancel
Save