Skip to content

Commit

Permalink
Merge pull request #87261 from alessandrofama/3.x-wasapi-failed-init
Browse files Browse the repository at this point in the history
[3.x] Fix Dummy audio driver initialization issue on WASAPI output device initialization failure
  • Loading branch information
akien-mga committed Jan 17, 2024
2 parents dd03a68 + 61b1e2e commit 2c5a420
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 @@ -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;
Expand Down

0 comments on commit 2c5a420

Please sign in to comment.