1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-26 17:58:43 -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,14 +178,10 @@ void DSPDeviceSinkEngine::work(int nbWriteSamples)
if ((m_threadedBasebandSampleSources.size() + m_basebandSampleSources.size()) == 1) if ((m_threadedBasebandSampleSources.size() + m_basebandSampleSources.size()) == 1)
{ {
// qDebug("DSPDeviceSinkEngine::work: single channel source handling"); // qDebug("DSPDeviceSinkEngine::work: single channel source handling");
if (m_threadedBasebandSampleSources.size() == 1) {
for (ThreadedBasebandSampleSources::iterator it = m_threadedBasebandSampleSources.begin(); it != m_threadedBasebandSampleSources.end(); ++it) m_threadedBasebandSampleSources.back()->feed(sampleFifo, nbWriteSamples);
{ } else if (m_basebandSampleSources.size() == 1) {
(*it)->feed(sampleFifo, nbWriteSamples); m_basebandSampleSources.back()->feed(sampleFifo, nbWriteSamples);
}
for (BasebandSampleSources::iterator it = m_basebandSampleSources.begin(); it != m_basebandSampleSources.end(); ++it)
{
(*it)->feed(sampleFifo, nbWriteSamples);
} }
} }
// multiple channel sources handling // multiple channel sources handling