1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-26 17:58:43 -05:00

Multiple modulators support: optimization: comment out code that is useless when processing sample by sample

This commit is contained in:
f4exb 2016-12-26 14:52:59 +01:00
parent 9213c85d6a
commit 03ff449ec8

View File

@ -467,14 +467,16 @@ DSPDeviceSinkEngine::State DSPDeviceSinkEngine::gotoRunning()
for(BasebandSampleSources::const_iterator it = m_basebandSampleSources.begin(); it != m_basebandSampleSources.end(); it++) for(BasebandSampleSources::const_iterator it = m_basebandSampleSources.begin(); it != m_basebandSampleSources.end(); it++)
{ {
qDebug() << "DSPDeviceSinkEngine::gotoRunning: starting " << (*it)->objectName().toStdString().c_str(); qDebug() << "DSPDeviceSinkEngine::gotoRunning: starting " << (*it)->objectName().toStdString().c_str();
(*it)->getSampleSourceFifo().resize(2*m_deviceSampleSink->getSampleFifo()->size()); // Equalize channel source FIFO size with device sink FIFO size // not used with sample by sample processing
// (*it)->getSampleSourceFifo().resize(2*m_deviceSampleSink->getSampleFifo()->size()); // Equalize channel source FIFO size with device sink FIFO size
(*it)->start(); (*it)->start();
} }
for (ThreadedBasebandSampleSources::const_iterator it = m_threadedBasebandSampleSources.begin(); it != m_threadedBasebandSampleSources.end(); ++it) for (ThreadedBasebandSampleSources::const_iterator it = m_threadedBasebandSampleSources.begin(); it != m_threadedBasebandSampleSources.end(); ++it)
{ {
qDebug() << "DSPDeviceSinkEngine::gotoRunning: starting ThreadedSampleSource(" << (*it)->getSampleSourceObjectName().toStdString().c_str() << ")"; qDebug() << "DSPDeviceSinkEngine::gotoRunning: starting ThreadedSampleSource(" << (*it)->getSampleSourceObjectName().toStdString().c_str() << ")";
(*it)->getSampleSourceFifo().resize(2*m_deviceSampleSink->getSampleFifo()->size()); // Equalize channel source FIFO size with device sink FIFO size // not used with sample by sample processing
// (*it)->getSampleSourceFifo().resize(2*m_deviceSampleSink->getSampleFifo()->size()); // Equalize channel source FIFO size with device sink FIFO size
(*it)->start(); (*it)->start();
} }
@ -584,10 +586,11 @@ void DSPDeviceSinkEngine::handleSynchronousMessages()
{ {
BasebandSampleSource* source = ((DSPAddSource*) message)->getSampleSource(); BasebandSampleSource* source = ((DSPAddSource*) message)->getSampleSource();
m_basebandSampleSources.push_back(source); m_basebandSampleSources.push_back(source);
BasebandSampleSourcesIteratorMapKV kv; // not used with sample by sample processing
kv.first = source; // BasebandSampleSourcesIteratorMapKV kv;
(source->getSampleSourceFifo()).getReadIterator(kv.second); // kv.first = source;
m_basebandSampleSourcesIteratorMap.insert(kv); // (source->getSampleSourceFifo()).getReadIterator(kv.second);
// m_basebandSampleSourcesIteratorMap.insert(kv);
} }
else if (DSPRemoveSource::match(*message)) else if (DSPRemoveSource::match(*message))
{ {
@ -597,24 +600,27 @@ void DSPDeviceSinkEngine::handleSynchronousMessages()
source->stop(); source->stop();
} }
m_basebandSampleSourcesIteratorMap.erase(source); // not used with sample by sample processing
// m_basebandSampleSourcesIteratorMap.erase(source);
m_basebandSampleSources.remove(source); m_basebandSampleSources.remove(source);
} }
else if (DSPAddThreadedSampleSource::match(*message)) else if (DSPAddThreadedSampleSource::match(*message))
{ {
ThreadedBasebandSampleSource *threadedSource = ((DSPAddThreadedSampleSource*) message)->getThreadedSampleSource(); ThreadedBasebandSampleSource *threadedSource = ((DSPAddThreadedSampleSource*) message)->getThreadedSampleSource();
m_threadedBasebandSampleSources.push_back(threadedSource); m_threadedBasebandSampleSources.push_back(threadedSource);
ThreadedBasebandSampleSourcesIteratorMapKV kv; // not used with sample by sample processing
kv.first = threadedSource; // ThreadedBasebandSampleSourcesIteratorMapKV kv;
(threadedSource->getSampleSourceFifo()).getReadIterator(kv.second); // kv.first = threadedSource;
m_threadedBasebandSampleSourcesIteratorMap.insert(kv); // (threadedSource->getSampleSourceFifo()).getReadIterator(kv.second);
// m_threadedBasebandSampleSourcesIteratorMap.insert(kv);
threadedSource->start(); threadedSource->start();
} }
else if (DSPRemoveThreadedSampleSource::match(*message)) else if (DSPRemoveThreadedSampleSource::match(*message))
{ {
ThreadedBasebandSampleSource* threadedSource = ((DSPRemoveThreadedSampleSource*) message)->getThreadedSampleSource(); ThreadedBasebandSampleSource* threadedSource = ((DSPRemoveThreadedSampleSource*) message)->getThreadedSampleSource();
threadedSource->stop(); threadedSource->stop();
m_threadedBasebandSampleSourcesIteratorMap.erase(threadedSource); // not used with sample by sample processing
// m_threadedBasebandSampleSourcesIteratorMap.erase(threadedSource);
m_threadedBasebandSampleSources.remove(threadedSource); m_threadedBasebandSampleSources.remove(threadedSource);
} }