• 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
My Iphone audio player app gets interrupted by the iPod player - how to prevent that?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

My Iphone audio player app gets interrupted by the iPod player - how to prevent that?


  • Subject: My Iphone audio player app gets interrupted by the iPod player - how to prevent that?
  • From: Roni Music <email@hidden>
  • Date: Wed, 14 Oct 2009 16:58:48 +0200


My iPhone audio player uses the kAudioSessionCategory_MediaPlayback category.

When it's playing and a user presses the "play/pause button" on the headphones cable, 
my interruption listener callback gets called with a kAudioSessionBeginInterruption event,
my player stops and the iPod player starts playing in the background.

The user that presses the "play/pause button" on the headphones cable does this with the intention to play/pause my app and
NOT the iPod player. He then presses the "play/pause button" on the headphones cable again to stop the iPod player
but my application is never informed by the interruption listener callback about this and thus never calls AudioSessionSetActive(true)
and it fails to start when the user presses the regular screen play button.

So, when my app is running, how can I prevent the iPod player to start playing in the background
or even better,
is there a way to trap the presses on the headphones cables and in that way control my player?

Thanks for any help,
Rolf Nilsson
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: My Iphone audio player app gets interrupted by the iPod player - how to prevent that?
      • From: Greg Chapman <email@hidden>
  • Prev by Date: AudioUnitRender -50 error
  • Next by Date: Re: My Iphone audio player app gets interrupted by the iPod player - how to prevent that?
  • Previous by thread: Re: AudioUnitRender -50 error
  • Next by thread: Re: My Iphone audio player app gets interrupted by the iPod player - how to prevent that?
  • Index(es):
    • Date
    • Thread