• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Question about Audio for iOS (SessionCategory?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about Audio for iOS (SessionCategory?)


  • Subject: Re: Question about Audio for iOS (SessionCategory?)
  • From: "Eric E. Dolecki" <email@hidden>
  • Date: Fri, 18 Aug 2017 17:47:54 +0000

If Apple Music is playing when my app starts up and I define the category -
Apple Music pauses.

If I start Apple Music after my app is running, I get Apple Music to duck
while my audio plays, but Apple Music remains ducked after my audio
completes.


*     try audioSession.setCategory(AVAudioSessionCategoryAmbient, with:
[.duckOthers])*

I would assume that the audio would come back up. And wouldn't think my app
would pause Apple Music when it starts up...


On Fri, Aug 18, 2017 at 1:34 PM Quincey Morris <
email@hidden> wrote:

> 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
>
> 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
>
> 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
>
> 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

  • Follow-Ups:
    • Re: Question about Audio for iOS (SessionCategory?)
      • From: Quincey Morris <email@hidden>
References: 
 >Question about Audio for iOS (SessionCategory?) (From: "Eric E. Dolecki" <email@hidden>)
 >Re: Question about Audio for iOS (SessionCategory?) (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: NSUserDefault controller bindings - observeValueForKeyPath called twice?
  • Next by Date: Re: Question about Audio for iOS (SessionCategory?)
  • Previous by thread: Re: Question about Audio for iOS (SessionCategory?)
  • Next by thread: Re: Question about Audio for iOS (SessionCategory?)
  • Index(es):
    • Date
    • Thread