diff --git a/src/audio/audio.cpp b/src/audio/audio.cpp index ae205adf4..9c701bfb4 100644 --- a/src/audio/audio.cpp +++ b/src/audio/audio.cpp @@ -527,12 +527,6 @@ bool Audio::isInputReady() return alInDev; } -bool Audio::isInputSubscribed() -{ - // No lock, inputSubscriptions is atomic! - return inputSubscriptions; -} - /** Returns true if the output device is open */ diff --git a/src/audio/audio.h b/src/audio/audio.h index e4e3b538b..48bf10c3b 100644 --- a/src/audio/audio.h +++ b/src/audio/audio.h @@ -81,7 +81,6 @@ public: } bool isInputReady(); - bool isInputSubscribed(); bool isOutputReady(); static void createSource(ALuint* source); diff --git a/src/widget/form/settings/avform.cpp b/src/widget/form/settings/avform.cpp index cb67e4e95..01663e111 100644 --- a/src/widget/form/settings/avform.cpp +++ b/src/widget/form/settings/avform.cpp @@ -335,21 +335,18 @@ void AVForm::onInDevChanged(QString deviceDescriptor) { if (!bodyUI->inDevCombobox->currentIndex()) deviceDescriptor = "none"; - Settings::getInstance().setInDev(deviceDescriptor); - Audio& audio = Audio::getInstance(); - if (audio.isInputSubscribed()) - audio.openInput(deviceDescriptor); + Settings::getInstance().setInDev(deviceDescriptor); + Audio::getInstance().reinitInput(deviceDescriptor); } void AVForm::onOutDevChanged(QString deviceDescriptor) { if (!bodyUI->outDevCombobox->currentIndex()) deviceDescriptor = "none"; - Settings::getInstance().setOutDev(deviceDescriptor); - Audio& audio = Audio::getInstance(); - audio.openOutput(deviceDescriptor); + Settings::getInstance().setOutDev(deviceDescriptor); + Audio::getInstance().reinitOutput(deviceDescriptor); } void AVForm::onFilterAudioToggled(bool filterAudio)