Re: Question about Audio for iOS (SessionCategory?)
Re: Question about Audio for iOS (SessionCategory?)
- Subject: Re: Question about Audio for iOS (SessionCategory?)
- From: Quincey Morris <email@hidden>
- Date: Fri, 18 Aug 2017 10:34:04 -0700
On Aug 18, 2017, at 10:10 , Eric E. Dolecki <email@hidden> wrote:
>
> try audioSession.setCategory(AVAudioSessionCategoryPlayback, with:
> [.allowBluetooth, .mixWithOthers])
According to the documentation, AVAudioSessionCategoryPlayback will “interrupt”
other audio that *doesn’t* have the mixWithOthers option, and this is defined
here:
https://developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/HandlingAudioInterruptions/HandlingAudioInterruptions.html
<https://developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/HandlingAudioInterruptions/HandlingAudioInterruptions.html>
That makes it sound like it’s up to the *other* application to resume after an
interruption, and it’s not under your control. What’s odd is that the first
table here:
https://developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionCategoriesandModes/AudioSessionCategoriesandModes.html
<https://developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionCategoriesandModes/AudioSessionCategoriesandModes.html>
says this behavior can be changed by an “override switch” without saying what
that means. This page:
https://developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionBasics/AudioSessionBasics.html
<https://developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionBasics/AudioSessionBasics.html>
suggests that it might mean the category options, but it’s not clear. Have you
tried the “duckOthers” option, as well as or instead of “mixWithOthers”?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden