We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5298

Summary: AVAudioSessionCategoryAmbient is no longer the default
Product: SDL Reporter: Diego <diegoacevedo91>
Component: audioAssignee: Ryan C. Gordon <icculus>
Status: NEW --- QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.1   
Hardware: iPhone/iPod touch   
OS: Other   

Description Diego 2020-09-24 17:54:07 UTC
This revision (http://hg.libsdl.org/SDL/rev/9c0592cc3e92) changed the default AVAudioSessionCategory from AVAudioSessionCategoryAmbient to AVAudioSessionCategoryPlayback which doesn't match the SDL_HINT_AUDIO_CATEGORY specified default value.
Comment 1 Diego 2020-10-02 01:04:35 UTC
Also, SDL_hints.h says SDL_HINT_AUDIO_CATEGORY should be set to the string "ambient" to use AVAudioSessionCategoryAmbient, when SDL_HINT_AUDIO_CATEGORY actually needs to be set to the string "AVAudioSessionCategoryAmbient" to use AVAudioSessionCategoryAmbient.

Also, just to give some context, I believe the default AVAudioSessionCategory should be AVAudioSessionCategoryAmbient instead of AVAudioSessionCategoryPlayback because AVAudioSessionCategoryPlayback decreases all sounds other than the apps. For example, if you have music playing and open the app that uses AVAudioSessionCategoryPlayback, the music will decrease in volume. This is not the default behavior in iOS apps.