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

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

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