Commit 93016ac6 authored by Max Kellermann's avatar Max Kellermann

output/wasapi: check AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED

Stop early, don't try more formats if it is clear that we have no chance.
parent fc20a1f1
......@@ -642,6 +642,9 @@ bool WasapiOutput::TryFormatExclusive(const AudioFormat &audio_format) {
device_format = test_format;
return true;
}
if (result == AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED)
throw std::runtime_error("Exclusive mode not allowed");
}
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment