Skip to content

Commit

Permalink
Fix Dummy audio driver initialization issue on WASAPI output device i…
Browse files Browse the repository at this point in the history
…nitialization failure

`AudioDriverWASAPI::init` consistently returns `Error::OK`, even when encountering a failure during the initialization of the output device. This behaviour blocks the dummy driver from initializing in `AudioDriverManager::initialize`.
  • Loading branch information
alessandrofama committed Jan 9, 2024
1 parent 8297ec9 commit 998078f
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 998078f

Please sign in to comment.