aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--alc/backends/wasapi.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/alc/backends/wasapi.cpp b/alc/backends/wasapi.cpp
index c0c33ffa..653c9098 100644
--- a/alc/backends/wasapi.cpp
+++ b/alc/backends/wasapi.cpp
@@ -535,8 +535,6 @@ struct DeviceHelper final : private IMMNotificationClient
}
device = nullptr;
}
-
- return defaultId;
#else
const auto deviceRole = Windows::Media::Devices::AudioDeviceRole::Default;
auto DefaultAudioId = flowdir == eRender ? MediaDevice::GetDefaultAudioRenderId(deviceRole)
@@ -548,7 +546,7 @@ struct DeviceHelper final : private IMMNotificationClient
defaultId = deviceInfo->Id->Data();
}).wait();
if(task_status != Concurrency::task_group_status::completed)
- return;
+ return defaultId;
// Get the string identifier of the audio renderer
auto AudioSelector = flowdir == eRender ? MediaDevice::GetAudioRenderSelector() : MediaDevice::GetAudioCaptureSelector();
@@ -574,6 +572,8 @@ struct DeviceHelper final : private IMMNotificationClient
}
}).wait();
#endif
+
+ return defaultId;
}
using NameGUIDPair = std::pair<std::string, std::string>;