allow SDL2_Mixer to adjust sample size

This commit is contained in:
Fabian Greffrath 2022-11-08 11:20:14 +01:00
parent 59d3a6a80e
commit 6be8c38aed

View File

@ -722,7 +722,8 @@ void I_InitSound(void)
return; return;
} }
if(Mix_OpenAudioDevice(snd_samplerate, MIX_DEFAULT_FORMAT, 2, audio_buffers, NULL, SDL_AUDIO_ALLOW_FREQUENCY_CHANGE) < 0) if (Mix_OpenAudioDevice(snd_samplerate, AUDIO_S16SYS, 2, audio_buffers, NULL,
SDL_AUDIO_ALLOW_FREQUENCY_CHANGE | SDL_AUDIO_ALLOW_SAMPLES_CHANGE) < 0)
{ {
printf("Couldn't open audio with desired format.\n"); printf("Couldn't open audio with desired format.\n");
return; return;