Implement the option for auto audio devices switching for Windows too

(previously SDL-only)
This commit is contained in:
Henrik Rydgård
2021-07-18 00:07:05 +02:00
parent e03c51fff2
commit 15f3269338
2 changed files with 8 additions and 4 deletions
+2 -2
View File
@@ -59,7 +59,7 @@ public:
deviceChanged_ = false;
}
bool HasDeviceChanged() {
bool HasDefaultDeviceChanged() const {
return deviceChanged_;
}
@@ -529,7 +529,7 @@ void WASAPIAudioThread::Run() {
}
// Check if we should use a new device.
if (notificationClient_ && notificationClient_->HasDeviceChanged()) {
if (notificationClient_ && notificationClient_->HasDefaultDeviceChanged() && g_Config.bAutoAudioDevice) {
hresult = audioInterface_->Stop();
ShutdownAudioDevice();