From f0c5b1a584cb963dfb9f63be10a10088aff90407 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Thu, 3 Mar 2022 22:33:45 +0200 Subject: [PATCH 28/28] Check that SDL2 >= 2.0.6 before setting SDL_HINT_AUDIO_RESAMPLING_MODE See osdn #44018 Signed-off-by: Marko Lindqvist --- client/audio_sdl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/audio_sdl.c b/client/audio_sdl.c index bfe37276b0..52f92b727b 100644 --- a/client/audio_sdl.c +++ b/client/audio_sdl.c @@ -188,7 +188,9 @@ static void quit_sdl_audio(void) **************************************************************************/ static int init_sdl_audio(void) { +#if SDL_VERSION_ATLEAST(2, 0, 6) SDL_SetHint(SDL_HINT_AUDIO_RESAMPLING_MODE, "medium"); +#endif if (SDL_WasInit(SDL_INIT_VIDEO)) { return SDL_InitSubSystem(SDL_INIT_AUDIO | SDL_INIT_NOPARACHUTE); -- 2.34.1