Skip to content

Commit 4725213

Browse files
committed
Support the "ambient" value for SDL_HINT_AUDIO_CATEGORY
Fixes #13732
1 parent 4b2a87a commit 4725213

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/audio/coreaudio/SDL_coreaudio.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,8 @@ static bool UpdateAudioSession(SDL_AudioDevice *device, bool open, bool allow_pl
420420

421421
hint = SDL_GetHint(SDL_HINT_AUDIO_CATEGORY);
422422
if (hint) {
423-
if (SDL_strcasecmp(hint, "AVAudioSessionCategoryAmbient") == 0) {
423+
if (SDL_strcasecmp(hint, "AVAudioSessionCategoryAmbient") == 0 ||
424+
SDL_strcasecmp(hint, "ambient") == 0) {
424425
category = AVAudioSessionCategoryAmbient;
425426
} else if (SDL_strcasecmp(hint, "AVAudioSessionCategorySoloAmbient") == 0) {
426427
category = AVAudioSessionCategorySoloAmbient;

0 commit comments

Comments
 (0)