Skip to content

Commit 54772f3

Browse files
committed
Support the "ambient" value for SDL_HINT_AUDIO_CATEGORY
Fixes libsdl-org#13732 (cherry picked from commit 4725213) (cherry picked from commit 5e85a29)
1 parent e257904 commit 54772f3

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
@@ -383,7 +383,8 @@ static BOOL update_audio_session(_THIS, SDL_bool open, SDL_bool allow_playandrec
383383

384384
hint = SDL_GetHint(SDL_HINT_AUDIO_CATEGORY);
385385
if (hint) {
386-
if (SDL_strcasecmp(hint, "AVAudioSessionCategoryAmbient") == 0) {
386+
if (SDL_strcasecmp(hint, "AVAudioSessionCategoryAmbient") == 0 ||
387+
SDL_strcasecmp(hint, "ambient") == 0) {
387388
category = AVAudioSessionCategoryAmbient;
388389
} else if (SDL_strcasecmp(hint, "AVAudioSessionCategorySoloAmbient") == 0) {
389390
category = AVAudioSessionCategorySoloAmbient;

0 commit comments

Comments
 (0)