-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Dummy audio driver initialization issue on WASAPI output device initialization failure #87010
Fix Dummy audio driver initialization issue on WASAPI output device initialization failure #87010
Conversation
516a120
to
9b3cad9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense otherwise, and other drivers exit this way as well
if (err != OK) { | ||
ERR_PRINT("WASAPI: init_output_device error"); | ||
} | ||
ERR_FAIL_COND_V_MSG(err != OK, err, "WASAPI: init_output_device error."); | ||
|
||
exit_thread.clear(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unsure if this should be moved up, it is above in the alsa code and could cause threading problems if not fired with this change, it's put at the top in some cases, I don't know what the exact structure should be for that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see it's above in the output initialisation of the alsa & pulseaudio drivers. The flag is only set in the thread entry point and in AudioDriverWASAPI::finish
. Not sure about the structure too. Could be moved up for consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved it up
9b3cad9
to
ebe77bb
Compare
…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`.
ebe77bb
to
998078f
Compare
Thanks! |
The original bug report was against 3.5.1, but this PR doesn't seem applicable to the 3.x code, which currently looks like this: 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();
thread.start(thread_func, this);
return OK;
} @alessandrofama Would you be up for checking whether the issue is still reproducible in |
Yes, it was reproducible. Created a PR :) |
Cherry-picked for 4.2.2. |
Cherry-picked for 4.1.4. |
AudioDriverWASAPI::init
consistently returnsError::OK
, even when encountering a failure during the initialization of the output device. This behaviour blocks the dummy driver from initializing inAudioDriverManager::initialize
. Fixes #71640.