-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Environment SDL_AUDIODRIVER may have invalid values #5818
Comments
We do handle the difference between "pulse" and "pulseaudio" as of #4693 — perhaps something similar could be done (though avoiding directsound may be worth doing on more modern systems…) |
It would be good if SDL3 has these versioned to avoid clashing (e.g.: I was sketching this for AGS: ericoporto/ags@30b7185 But it felt like it was supposed to be in SDL2 instead. MojoAL and other libraries don't have a way to reuse a device because they also pass additional information when opening for things like frequency, which gets checked by SDL2. Essentially I would like SDL2 to only fail if neither of the sensible audio drivers works - this may be a different issue, but just thought I should inform the context.
I think people are avoiding WASAPI because of #5538 , since the bug reports about this environment variable came from people with discreet audio cards. |
sdl12-compat probably needs that |
Yep, I'll go ahead and implement this. |
Fixes libsdl-org#5818 (cherry picked from commit abe38bc)
If someone has used an SDL1 software or driver, on Windows, they may have set an environment variable of
SDL_AUDIODRIVER
todsound
, but it now has been renamed asdirectsound
. Since the environment variables don't have a version numberSDL2_...
, you may hit an audio driver system that doesn't initialize.https://www.libsdl.org/release/SDL-1.2.15/docs/html/sdlenvvars.html
It would be useful if
SDL_InitSubSystem(SDL_INIT_AUDIO)
would not fail in an invalid environment variable, and instead attempt known good audio drivers before failing - like wasapi, directsound and winmm in Windows, but not dummy or disk.The text was updated successfully, but these errors were encountered: