1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-22 16:08:39 -05:00

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

This commit is contained in:
f4exb 2018-01-02 00:27:45 +01:00
parent 0f1291eaaa
commit 8801462f96

View File

@ -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)