diff --git a/plugins/samplesource/fcdpro/fcdproinput.cpp b/plugins/samplesource/fcdpro/fcdproinput.cpp index c91ba1187b..834239319c 100644 --- a/plugins/samplesource/fcdpro/fcdproinput.cpp +++ b/plugins/samplesource/fcdpro/fcdproinput.cpp @@ -174,7 +174,7 @@ void FCDProInput::closeDevice() bool FCDProInput::openFCDAudio(const char* cardname) { AudioDeviceManager *audioDeviceManager = DSPEngine::instance()->getAudioDeviceManager(); - const QList& audioList = audioDeviceManager->getInputDevices(); + const QList& audioList = AudioDeviceInfo::availableInputDevices(); for (const auto &itAudio : audioList) { diff --git a/plugins/samplesource/fcdproplus/fcdproplusinput.cpp b/plugins/samplesource/fcdproplus/fcdproplusinput.cpp index f72e0024d2..ee3bce44ac 100644 --- a/plugins/samplesource/fcdproplus/fcdproplusinput.cpp +++ b/plugins/samplesource/fcdproplus/fcdproplusinput.cpp @@ -176,7 +176,7 @@ void FCDProPlusInput::closeDevice() bool FCDProPlusInput::openFCDAudio(const char* cardname) { AudioDeviceManager *audioDeviceManager = DSPEngine::instance()->getAudioDeviceManager(); - const QList& audioList = audioDeviceManager->getInputDevices(); + const QList& audioList = AudioDeviceInfo::availableInputDevices(); for (const auto &itAudio : audioList) { diff --git a/sdrbase/audio/audiodeviceinfo.cpp b/sdrbase/audio/audiodeviceinfo.cpp index e766898eb2..ec457aef74 100644 --- a/sdrbase/audio/audiodeviceinfo.cpp +++ b/sdrbase/audio/audiodeviceinfo.cpp @@ -73,28 +73,28 @@ QString AudioDeviceInfo::realm() const #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) const QList &AudioDeviceInfo::availableInputDevices() { - if (!m_inputDevicesEnumerated) { + if (!inputDevicesEnumerated) { QList devInfos = QMediaDevices::audioInputs(); for (auto devInfo : devInfos) { - m_inputDevices.append(AudioDeviceInfo(devInfo)); + inputDevices.append(AudioDeviceInfo(devInfo)); } - m_inputDevicesEnumerated = true; + inputDevicesEnumerated = true; } - return m_inputDevices; + return inputDevices; } const QList &AudioDeviceInfo::availableOutputDevices() { - if (!m_outputDevicesEnumerated) { + if (!outputDevicesEnumerated) { QList devInfos = QMediaDevices::audioOutputs(); for (auto devInfo : devInfos) { - m_outputDevices.append(AudioDeviceInfo(devInfo)); + outputDevices.append(AudioDeviceInfo(devInfo)); } - m_outputDevicesEnumerated = true; + outputDevicesEnumerated = true; } - return m_outputDevices; + return outputDevices; } #else const QList &AudioDeviceInfo::availableInputDevices() diff --git a/sdrbase/webapi/webapiadapter.cpp b/sdrbase/webapi/webapiadapter.cpp index 3e7d32841f..b72a20d409 100644 --- a/sdrbase/webapi/webapiadapter.cpp +++ b/sdrbase/webapi/webapiadapter.cpp @@ -454,8 +454,8 @@ int WebAPIAdapter::instanceAudioGet( { (void) error; DSPEngine *dspEngine = DSPEngine::instance(); - const QList& audioInputDevices = dspEngine->getAudioDeviceManager()->getInputDevices(); - const QList& audioOutputDevices = dspEngine->getAudioDeviceManager()->getOutputDevices(); + const QList& audioInputDevices = AudioDeviceInfo::availableInputDevices(); + const QList& audioOutputDevices = AudioDeviceInfo::availableOutputDevices(); int nbInputDevices = audioInputDevices.size(); int nbOutputDevices = audioOutputDevices.size();