Audio Session Category Play and Record Not Mixing with Other Audio

Originator:gbutler
Number:rdar://13451949 Date Originated:19-Mar-2013 01:01 PM
Status:Open Resolved:
Product:iPhone SDK Product Version:
Classification:Serious Bug Reproducible:Always
 
Summary:
When using the audio session category for Play and Record, mixing with other audio and ducking do not work as described by Modifying Audio Mixing Behavior in the Audio Session Programming Guide. http://developer.apple.com/library/ios/#documentation/Audio/Conceptual/AudioSessionProgrammingGuide/Cookbook/Cookbook.html#//apple_ref/doc/uid/TP40007875-CH6-SW35

Steps to Reproduce:
1. Play some audio in the background through another app, such as the iPod app, Spotify, etc.
2. Setup your audio session.
    a. Set the category to be Play and Record.
    b. Allow the category to mix with others.
    c. Set the other audio to duck.
3. Active your audio session.
4. Play some audio.
5. Deactivate your audio session.

Expected Results:
The background audio will mix and duck with our audio while it plays.

Actual Results:
There is a gap in the playback of the background audio, then our audio starts playing, along with louder background audio. Once we deactivate the audio session, there is another gap in the playback of the background audio, and then it returns to normal levels.

Regression:

Notes:
Not sure how long this has existed, but other people have encountered this bug, as reported in this Stack Overflow question. http://stackoverflow.com/questions/14687774/audiosessionsetactivetrue-stops-the-ipod-player-shortly-in-case-of-category-ka

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!