mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-04-04 10:38:45 -04:00
Multi device support: removed start/stop in DSPEngine
This commit is contained in:
parent
400e6b1028
commit
2f080bf45b
@ -54,19 +54,6 @@ MessageQueue* DSPEngine::getOutputMessageQueue(uint deviceIndex)
|
||||
return m_deviceEngines[deviceIndex]->getOutputMessageQueue();
|
||||
}
|
||||
|
||||
void DSPEngine::start(uint deviceIndex)
|
||||
{
|
||||
qDebug("DSPEngine::start(%d)", deviceIndex);
|
||||
m_deviceEngines[deviceIndex]->start();
|
||||
}
|
||||
|
||||
void DSPEngine::stop(uint deviceIndex)
|
||||
{
|
||||
qDebug("DSPEngine::stop(%d)", deviceIndex);
|
||||
m_audioOutput.stop(); // FIXME: do not stop here since it is global
|
||||
m_deviceEngines[deviceIndex]->stop();
|
||||
}
|
||||
|
||||
void DSPEngine::stopAllAcquisitions()
|
||||
{
|
||||
std::vector<DSPDeviceEngine*>::iterator it = m_deviceEngines.begin();
|
||||
@ -74,6 +61,7 @@ void DSPEngine::stopAllAcquisitions()
|
||||
while (it != m_deviceEngines.end())
|
||||
{
|
||||
(*it)->stopAcquistion();
|
||||
stopAudio();
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
@ -43,9 +43,6 @@ public:
|
||||
|
||||
uint getAudioSampleRate() const { return m_audioSampleRate; }
|
||||
|
||||
void start(uint deviceIndex = 0); //!< Device engine(s) start
|
||||
void stop(uint deviceIndex = 0); //!< Device engine(s) stop
|
||||
|
||||
void stopAllAcquisitions();
|
||||
void stopAllDeviceEngines();
|
||||
|
||||
|
@ -63,8 +63,6 @@ MainWindow::MainWindow(QWidget* parent) :
|
||||
m_sampleFileName(std::string("./test.sdriq"))
|
||||
{
|
||||
qDebug() << "MainWindow::MainWindow: start";
|
||||
connect(m_dspEngine->getOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection);
|
||||
m_dspEngine->start();
|
||||
|
||||
ui->setupUi(this);
|
||||
createStatusBar();
|
||||
@ -103,20 +101,16 @@ MainWindow::MainWindow(QWidget* parent) :
|
||||
|
||||
qDebug() << "MainWindow::MainWindow: m_pluginManager->loadPlugins ...";
|
||||
|
||||
m_pluginManager = new PluginManager(this, m_dspEngine->getDeviceEngineByIndex(0));
|
||||
// TODO: This will go in a create new device and device tab method:
|
||||
|
||||
DSPDeviceEngine *dspDeviceEngine = m_dspEngine->getDeviceEngineByIndex(0);
|
||||
|
||||
connect(dspDeviceEngine->getOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection);
|
||||
dspDeviceEngine->start();
|
||||
|
||||
m_pluginManager = new PluginManager(this, dspDeviceEngine);
|
||||
m_pluginManager->loadPlugins();
|
||||
|
||||
//bool sampleSourceSignalsBlocked = ui->sampleSource->blockSignals(true);
|
||||
//m_pluginManager->fillSampleSourceSelector(ui->sampleSource);
|
||||
//ui->sampleSource->blockSignals(sampleSourceSignalsBlocked);
|
||||
|
||||
//m_rxSpectrumVis = new SpectrumVis(ui->rxSpectrum);
|
||||
//ui->rxSpectrum->connectTimer(m_masterTimer);
|
||||
//ui->rxSpectrumGUI->setBuddies(m_rxSpectrumVis->getInputMessageQueue(), m_rxSpectrumVis, ui->rxSpectrum);
|
||||
//m_dspEngine->
|
||||
|
||||
// TODO: This will go in a create new device tab method:
|
||||
|
||||
m_deviceUIs.push_back(new DeviceUISet(m_masterTimer));
|
||||
|
||||
ui->tabSpectra->addTab(m_deviceUIs.back()->m_spectrum, "X0");
|
||||
@ -186,7 +180,7 @@ MainWindow::~MainWindow()
|
||||
//delete m_rxSpectrumVis;
|
||||
delete m_pluginManager;
|
||||
|
||||
m_dspEngine->stop();
|
||||
m_dspEngine->stopAllDeviceEngines();
|
||||
|
||||
delete ui;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user