Merge pull request #87261 from alessandrofama/3.x-wasapi-failed-init

[3.x] Fix Dummy audio driver initialization issue on WASAPI output device initialization failure
This commit is contained in:
Rémi Verschelde 2024-01-17 13:46:20 +01:00
commit 2c5a420701
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -399,13 +399,11 @@ Error AudioDriverWASAPI::finish_capture_device() {
Error AudioDriverWASAPI::init() {
mix_rate = GLOBAL_GET("audio/mix_rate");
Error err = init_render_device();
if (err != OK) {
ERR_PRINT("WASAPI: init_render_device error");
}
exit_thread.clear();
Error err = init_render_device();
ERR_FAIL_COND_V_MSG(err != OK, err, "WASAPI: init_render_device error.");
thread.start(thread_func, this);
return OK;