1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-01 21:54:55 -04:00

Multiple audio support: added ability to manage more than one audio input

This commit is contained in:
f4exb
2018-03-25 00:57:14 +01:00
parent 7aaa230eb4
commit a4b6edbf07
5 changed files with 65 additions and 85 deletions
+4 -7
View File
@@ -234,10 +234,10 @@ int WebAPIAdapterGUI::instanceAudioGet(
response.init();
response.setNbInputDevices(nbInputDevices);
response.setInputDeviceSelectedIndex(m_mainWindow.m_dspEngine->getAudioDeviceManager()->getInputDeviceIndex());
response.setInputDeviceSelectedIndex(-1); // FIXME: remove
response.setNbOutputDevices(nbOutputDevices);
response.setOutputDeviceSelectedIndex(-1); // FIXME: remove
response.setInputVolume(m_mainWindow.m_dspEngine->getAudioDeviceManager()->getInputVolume());
response.setInputVolume(1.0f); // FIXME: remove
QList<SWGSDRangel::SWGAudioDevice*> *inputDevices = response.getInputDevices();
QList<SWGSDRangel::SWGAudioDevice*> *outputDevices = response.getOutputDevices();
@@ -276,11 +276,8 @@ int WebAPIAdapterGUI::instanceAudioPatch(
inputIndex = inputIndex < -1 ? -1 : inputIndex > nbInputDevices ? nbInputDevices-1 : inputIndex;
outputIndex = outputIndex < -1 ? -1 : outputIndex > nbOutputDevices ? nbOutputDevices-1 : outputIndex;
m_mainWindow.m_dspEngine->getAudioDeviceManager()->setInputVolume(inputVolume);
m_mainWindow.m_dspEngine->getAudioDeviceManager()->setInputDeviceIndex(inputIndex);
response.setInputVolume(m_mainWindow.m_dspEngine->getAudioDeviceManager()->getInputVolume());
response.setInputIndex(m_mainWindow.m_dspEngine->getAudioDeviceManager()->getInputDeviceIndex());
response.setInputVolume(1.0f); // FIXME: remove
response.setInputIndex(-1); // FIXME: remove
response.setOutputIndex(-1); // FIXME: remove
return 200;