Re: iPod Touch, headset and kAudioSessionBeginInterruption
Re: iPod Touch, headset and kAudioSessionBeginInterruption
- Subject: Re: iPod Touch, headset and kAudioSessionBeginInterruption
- From: Sam Clegg <email@hidden>
- Date: Wed, 25 Aug 2010 16:33:41 -0700
On Fri, 2010-08-20 at 12:08 -0700, William Stewart wrote:
> This is still an issue in shipping iOS releases, however it will be
> fixed in a future revision. You can listen for the InputIsAvailable
> property (so, in the begin interruption, check to see if input has
> gone away)
While this solution can work, as far as I can tell its not possible to
distigish "real" interruptions from "phony" interruptions, simply based
on InputIsAvailable.
The "phony" interruptions occur only sometimes but when they do occur
its always within about 3 or 4 seconds of the routeChanged callback.
But its also possible to get a "real" interruption at any time, right?
i.e. and alarm going off or some other OS event that interruption the
application's audio.
So I can write code that says "if (inputNotAvailable &&
routeRecentlyChanged) -> assumePhonyAndIngore()" but as described above
I'm pretty sure this can generate false positives.
Can we expect a fix in iOS any time soon?
>
>
> You shouldn't be getting an interruption for input availability
> changing
>
>
> Bill
>
> > > > From: Sam Clegg <email@hidden>
> > > >
> > > > Date: August 19, 2010 4:59:41 PM PDT
> > > >
> > > > To: email@hidden
> > > >
> > > > Subject: iPod Touch, headset and kAudioSessionBeginInterruption
> > > >
> > > >
> > > > Hi all,
> > > >
> > > > This is my first post the list so please go easy on me. I'm
> > > > resurrecting thread from back in March of last year:
> > > >
> > > > http://lists.apple.com/archives/coreaudio-api/2009/Mar/msg00341.html
> > > >
> > > > Did this ever get resolved? If so please ignore the rest of
> > > > this
> > > > message.
> > > >
> > > > We've been experiencing this exact same problem and can
> > > > reproduce it
> > > > pretty consistently on iTouch devices. The problem is
> > > > essentially that
> > > > removing the headset while while in PlayAndRecord mode causes an
> > > > AudioSession interruption that never ends.
> > > >
> > > > Reproduction steps:
> > > >
> > > > 1) Download the SpeakHere example from the apple developer site.
> > > > 2) Put printf statements in the route changed callback, the
> > > > interruption callback and the input availability callback.
> > > > 3) Run the app on an iPod touch with the headset initially
> > > > plugged
> > > > 4) Start recording and unplug the headset during recording.
> > > > 5) Notice the following sequence of printf statements in the
> > > > debug console:
> > > >
> > > > - route changed (stopping input queue)
> > > > - interruptionListener: Begin
> > > > - input availability changed
> > > >
> > > > Notice the lack of any end to the interruption.
> > > >
> > > > In our more complicated application I've tried doing all kind of
> > > > things
> > > > to the audio session when the initial route changed callback is
> > > > fired,
> > > > but whatever I do I can't seem to avoid the following
> > > > interruption.
> > > >
> > > > I myself have reproduced that above problem on an iTouch 3G
> > > > running iOS
> > > > 4.1 beta3.
> > > >
> > > >
> > > > --
> > > > sam clegg
> > > > email@hidden
> > > >
> > > > _______________________________________________
> > > > Do not post admin requests to the list. They will be ignored.
> > > > Coreaudio-api mailing list (email@hidden)
> > > > Help/Unsubscribe/Update your Subscription:
> > > > 40apple.com
> > > >
> > > > This email sent to email@hidden
> > > >
> > >
> > >
> >
> >
>
> _______________________________________________
> 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
--
sam clegg
email@hidden
_______________________________________________
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