dont force directsound for sdl versions from 2.26.5 on windows

directsound is deprecated since 13 years!
superseeded by wasapi
2.26.5 sdl brought some major improvements to resampling which fixes the issues this aimed to work around, but instead this workaround caused a plethora of issues, like breaking loops in some cases or the votescreen music
This commit is contained in:
Alug 2025-10-23 15:53:50 +01:00 committed by NepDisk
parent ad329fcc66
commit 7618566aa4
2 changed files with 4 additions and 2 deletions

View file

@ -181,9 +181,10 @@ void I_StartupSound(void)
if (sound_started)
return;
#ifdef _WIN32
#if defined(_WIN32) && !SDL_VERSION_ATLEAST(2,26,5)
// Force DirectSound instead of WASAPI
// SDL 2.0.6+ defaults to the latter and it screws up our sound effects
// SDL 2.26.5 brought imrovements to resampling so this just screws up other stuff now
SDL_setenv("SDL_AUDIODRIVER", "directsound", 1);
#endif

View file

@ -1169,9 +1169,10 @@ void I_StartupSound(void)
// Configure sound device
CONS_Printf("I_StartupSound:\n");
#ifdef _WIN32
#if defined(_WIN32) && !SDL_VERSION_ATLEAST(2,26,5)
// Force DirectSound instead of WASAPI
// SDL 2.0.6+ defaults to the latter and it screws up our sound effects
// SDL 2.26.5 brought imrovements to resampling so this just screws up other stuff now
SDL_setenv("SDL_AUDIODRIVER", "directsound", 1);
#endif