mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-07 08:24:43 -04:00
Multi device support: Main window: created a method to add a new device and associated objects
This commit is contained in:
@@ -20,10 +20,11 @@
|
||||
#include "dsp/dspengine.h"
|
||||
|
||||
DSPEngine::DSPEngine() :
|
||||
m_deviceEnginesUIDSequence(0),
|
||||
m_audioSampleRate(48000), // Use default output device at 48 kHz
|
||||
m_audioUsageCount(0)
|
||||
{
|
||||
m_deviceEngines.push_back(new DSPDeviceEngine(0)); // TODO: multi device support
|
||||
//m_deviceEngines.push_back(new DSPDeviceEngine(0)); // TODO: multi device support
|
||||
m_dvSerialSupport = false;
|
||||
}
|
||||
|
||||
@@ -44,6 +45,23 @@ DSPEngine *DSPEngine::instance()
|
||||
return dspEngine;
|
||||
}
|
||||
|
||||
DSPDeviceEngine *DSPEngine::addDeviceEngine()
|
||||
{
|
||||
m_deviceEngines.push_back(new DSPDeviceEngine(m_deviceEnginesUIDSequence));
|
||||
m_deviceEnginesUIDSequence++;
|
||||
return m_deviceEngines.back();
|
||||
}
|
||||
|
||||
void DSPEngine::removeLastDeviceEngine()
|
||||
{
|
||||
if (m_deviceEngines.size() > 0)
|
||||
{
|
||||
DSPDeviceEngine *lastDeviceEngine = m_deviceEngines.back();
|
||||
delete lastDeviceEngine;
|
||||
m_deviceEngines.pop_back();
|
||||
}
|
||||
}
|
||||
|
||||
void DSPEngine::stopAllAcquisitions()
|
||||
{
|
||||
std::vector<DSPDeviceEngine*>::iterator it = m_deviceEngines.begin();
|
||||
|
||||
Reference in New Issue
Block a user