From 4725213eeff211267fa9c8f71bee1baad406f590 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 12 Aug 2025 09:53:41 -0700 Subject: [PATCH] Support the "ambient" value for SDL_HINT_AUDIO_CATEGORY Fixes https://github.com/libsdl-org/SDL/issues/13732 --- src/audio/coreaudio/SDL_coreaudio.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/audio/coreaudio/SDL_coreaudio.m b/src/audio/coreaudio/SDL_coreaudio.m index e7d9e58a39..3a2217802f 100644 --- a/src/audio/coreaudio/SDL_coreaudio.m +++ b/src/audio/coreaudio/SDL_coreaudio.m @@ -420,7 +420,8 @@ static bool UpdateAudioSession(SDL_AudioDevice *device, bool open, bool allow_pl hint = SDL_GetHint(SDL_HINT_AUDIO_CATEGORY); if (hint) { - if (SDL_strcasecmp(hint, "AVAudioSessionCategoryAmbient") == 0) { + if (SDL_strcasecmp(hint, "AVAudioSessionCategoryAmbient") == 0 || + SDL_strcasecmp(hint, "ambient") == 0) { category = AVAudioSessionCategoryAmbient; } else if (SDL_strcasecmp(hint, "AVAudioSessionCategorySoloAmbient") == 0) { category = AVAudioSessionCategorySoloAmbient;