From 61b1e2e83fd23492a062ff9e8addeeb12e7a098d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alessandro=20Fam=C3=A0?= Date: Tue, 16 Jan 2024 18:40:56 +0100 Subject: [PATCH] [3.x] Fix Dummy audio driver initialization issue on WASAPI output device initialization failure --- drivers/wasapi/audio_driver_wasapi.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/wasapi/audio_driver_wasapi.cpp b/drivers/wasapi/audio_driver_wasapi.cpp index e654d664474..330f1ae7244 100644 --- a/drivers/wasapi/audio_driver_wasapi.cpp +++ b/drivers/wasapi/audio_driver_wasapi.cpp @@ -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;