mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-29 23:52:30 +00:00
Force directsound to fix wrong-pitch sound effects
This commit is contained in:
parent
1029463741
commit
01f1933f69
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