Skip to content

Commit

Permalink
Merge pull request #87010 from alessandrofama/wasapi-failed-init
Browse files Browse the repository at this point in the history
Fix Dummy audio driver initialization issue on WASAPI output device initialization failure
  • Loading branch information
akien-mga committed Jan 9, 2024
2 parents 476cbbd + 998078f commit aa07403
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions drivers/wasapi/audio_driver_wasapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -557,13 +557,11 @@ Error AudioDriverWASAPI::init() {

target_latency_ms = Engine::get_singleton()->get_audio_output_latency();

Error err = init_output_device();
if (err != OK) {
ERR_PRINT("WASAPI: init_output_device error");
}

exit_thread.clear();

Error err = init_output_device();
ERR_FAIL_COND_V_MSG(err != OK, err, "WASAPI: init_output_device error.");

thread.start(thread_func, this);

return OK;
Expand Down

0 comments on commit aa07403

Please sign in to comment.