mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-08 20:38:14 +00:00
Support the "ambient" value for SDL_HINT_AUDIO_CATEGORY
Fixes https://github.com/libsdl-org/SDL/issues/13732 (cherry picked from commit4725213eef
) (cherry picked from commit5e85a29e75
)
This commit is contained in:
@@ -383,7 +383,8 @@ static BOOL update_audio_session(_THIS, SDL_bool open, SDL_bool allow_playandrec
|
|||||||
|
|
||||||
hint = SDL_GetHint(SDL_HINT_AUDIO_CATEGORY);
|
hint = SDL_GetHint(SDL_HINT_AUDIO_CATEGORY);
|
||||||
if (hint) {
|
if (hint) {
|
||||||
if (SDL_strcasecmp(hint, "AVAudioSessionCategoryAmbient") == 0) {
|
if (SDL_strcasecmp(hint, "AVAudioSessionCategoryAmbient") == 0 ||
|
||||||
|
SDL_strcasecmp(hint, "ambient") == 0) {
|
||||||
category = AVAudioSessionCategoryAmbient;
|
category = AVAudioSessionCategoryAmbient;
|
||||||
} else if (SDL_strcasecmp(hint, "AVAudioSessionCategorySoloAmbient") == 0) {
|
} else if (SDL_strcasecmp(hint, "AVAudioSessionCategorySoloAmbient") == 0) {
|
||||||
category = AVAudioSessionCategorySoloAmbient;
|
category = AVAudioSessionCategorySoloAmbient;
|
||||||
|
Reference in New Issue
Block a user