mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 21:01:04 +00:00
Merge branch 'sdl-sound-fix' into 'master'
SDL: Force use DirectSound driver to fix wrong-pitch sound effects See merge request STJr/SRB2!375
This commit is contained in:
commit
6b1b11441d
2 changed files with 12 additions and 0 deletions
|
@ -92,6 +92,12 @@ void I_StartupSound(void)
|
|||
{
|
||||
I_Assert(!sound_started);
|
||||
|
||||
#ifdef _WIN32
|
||||
// Force DirectSound instead of WASAPI
|
||||
// SDL 2.0.6+ defaults to the latter and it screws up our sound effects
|
||||
SDL_setenv("SDL_AUDIODRIVER", "directsound", 1);
|
||||
#endif
|
||||
|
||||
// EE inits audio first so we're following along.
|
||||
if (SDL_WasInit(SDL_INIT_AUDIO) == SDL_INIT_AUDIO)
|
||||
{
|
||||
|
|
|
@ -1186,6 +1186,12 @@ void I_StartupSound(void)
|
|||
// Configure sound device
|
||||
CONS_Printf("I_StartupSound:\n");
|
||||
|
||||
#ifdef _WIN32
|
||||
// Force DirectSound instead of WASAPI
|
||||
// SDL 2.0.6+ defaults to the latter and it screws up our sound effects
|
||||
SDL_setenv("SDL_AUDIODRIVER", "directsound", 1);
|
||||
#endif
|
||||
|
||||
// EE inits audio first so we're following along.
|
||||
if (SDL_WasInit(SDL_INIT_AUDIO) == SDL_INIT_AUDIO)
|
||||
CONS_Printf("SDL Audio already started\n");
|
||||
|
|
Loading…
Reference in a new issue