Fix Dummy audio driver initialization issue on WASAPI output device initialization 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`.
(cherry picked from commit 998078f8d7
)
This commit is contained in:
parent
5ffc22b06f
commit
1fa33b6072
|
@ -557,13 +557,11 @@ Error AudioDriverWASAPI::init() {
|
||||||
|
|
||||||
target_latency_ms = GLOBAL_GET("audio/driver/output_latency");
|
target_latency_ms = GLOBAL_GET("audio/driver/output_latency");
|
||||||
|
|
||||||
Error err = init_output_device();
|
|
||||||
if (err != OK) {
|
|
||||||
ERR_PRINT("WASAPI: init_output_device error");
|
|
||||||
}
|
|
||||||
|
|
||||||
exit_thread.clear();
|
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);
|
thread.start(thread_func, this);
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
|
|
Loading…
Reference in New Issue