Re: My Iphone audio player app gets interrupted by the iPod
Re: My Iphone audio player app gets interrupted by the iPod
- Subject: Re: My Iphone audio player app gets interrupted by the iPod
- From: "Roni Music" <email@hidden>
- Date: Thu, 15 Oct 2009 10:12:54 +0200
On Oct 14, 2009, at 10:22 AM, Roni Music wrote:
2. You should be getting an interruption callback "end interruption"
when iPod app stops.
I'm surprised you aren't... what iPhone OS version are you running on?
I just updated to OS 3.1.2 and I can confirm that my app never receives
the kAudioSessionEndInterruption
when one pauses the iPod player again.
That's bad, and unexpected. Can you file a bug please? I want to make
sure this gets fixed.
Radar bug id: 7305410
Thanks for the clarifications below,
Rolf
3. When the user touches your apps play button, you fail to play because
you are not active.
This you can fix! If the user presses the play button in your app,
calling AudioSessionSetActive(true) before
starting playback is a perfectly reasonable thing to do. It's OK to
interrupt other apps' audio if the user asks you to,
<even if you haven't received an "end interruption" callback. Even
without the bug in (2) above, iPod app might still
be playing when the user hits the play button, so you legitimately might
not have received the "end interruption" callback.
OK, that was an easy fix, works fine.
So one can call AudioSessionSetActive(true) before every playback call
even though it's already active?
Yes you can, but please do not do it unless you are trying to play because
the user asked you to. Otherwise this is considered "not playing nice
with others". In your app, I think it is always the case that you only
play if the user asks you to, but other apps might have different
behaviours.
Also, after a kAudioSessionEndInterruption, I also set the
kAudioSessionCategory_xx plus AudioSessionSetActive(true)
I think I do that after reading some docs long ago, is this needed?
We don't forget your category when you are interrupted, so this is not
necessary. It would only be necessary if you really want to _change_ your
category before becoming active again.
Greg
_______________________________________________
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