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 - AVAudioSessionCategoryAmbient is no longer the default
Summary: AVAudioSessionCategoryAmbient is no longer the default
Status: NEW
Alias: None
Product: SDL
Classification: Unclassified
Component: audio (show other bugs)
Version: HG 2.1
Hardware: iPhone/iPod touch Other
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-24 17:54 UTC by Diego
Modified: 2020-10-02 01:04 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.