summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2021-03-08 17:46:58 +0100
committerMax Kellermann <max@musicpd.org>2021-03-08 17:47:07 +0100
commit4833d0891de4d838571fbe5c2aad94c6288e2dca (patch)
tree8f0702cd01afa37d9599665d856f9288f03b46ad /src
parentcd53ca22c6e4596f7606445ed3b0875e9faa213a (diff)
output/wasapi: eliminate kErrorId
Diffstat (limited to 'src')
-rw-r--r--src/output/plugins/wasapi/WasapiOutputPlugin.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/output/plugins/wasapi/WasapiOutputPlugin.cxx b/src/output/plugins/wasapi/WasapiOutputPlugin.cxx
index e387a48e4..71e55bfc7 100644
--- a/src/output/plugins/wasapi/WasapiOutputPlugin.cxx
+++ b/src/output/plugins/wasapi/WasapiOutputPlugin.cxx
@@ -147,8 +147,6 @@ void SetDSDFallback(AudioFormat &audio_format) noexcept {
}
#endif
-inline constexpr const unsigned int kErrorId = -1;
-
} // namespace
class WasapiOutputThread : public Thread {
@@ -637,8 +635,8 @@ void WasapiOutput::OpenDevice() {
}
}
- unsigned int id = kErrorId;
if (!device_config.empty()) {
+ unsigned int id;
if (!SafeSilenceTry([this, &id]() { id = std::stoul(device_config); })) {
device = SearchDevice(device_config);
if (!device)