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.
This commit is contained in:
parent
fc20a1f10a
commit
93016ac6ab
|
@ -642,6 +642,9 @@ bool WasapiOutput::TryFormatExclusive(const AudioFormat &audio_format) {
|
||||||
device_format = test_format;
|
device_format = test_format;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (result == AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED)
|
||||||
|
throw std::runtime_error("Exclusive mode not allowed");
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue