Re: how to unregister interuptListener registered in AudioSessionInitialize() on iPhone
Re: how to unregister interuptListener registered in AudioSessionInitialize() on iPhone
- Subject: Re: how to unregister interuptListener registered in AudioSessionInitialize() on iPhone
- From: William Stewart <email@hidden>
- Date: Mon, 23 Feb 2009 19:42:12 -0800
um - do NOT do this. In fact as you have published this, we'll
probably break it
This has not been used outside of that context and we make no
guarantees that this will work - or continue to work - the way you
currently "think it will"
You need to use APIs and not to hack into the system and use private
ones. You have no idea of the constraints under which those properties
are used, or the limitations that they operate under.
The worst of it is, is that you guys hack around things like this,
then we find that you've done this - usually badly - but your Apps
stop working. Then we have to mop up the mess and try to figure out
what you are doing, why you are doing it, and how we keep your ill-
informed code working. Even worse, half the time when we're dealing
with this, we are under tight deadlines, and you don't answer our
calls (often because you feel guilty I guess of having done this in
the first place)...
If there is functionality that you want, then the right way to do this
is to either bring the issue up with us on a mailing list, or
preferably, write a bugreport describing the problem you are having,
and what you would like to see changed to fix that.
Bill
On Feb 23, 2009, at 7:22 PM, Christopher Atlan wrote:
Hi Andy,
take a look at my blog post "AudioSessionInitialize Workarounds". I
describe how you should use interruption listeners with a helper
class, but because AVAudioPlayer works without this helper class I
looked a little bit deeper and discovered a workaround... (private
API).
http://www.restoroot.com/Blog/2008/12/25/audiosessioninitialize-workarounds/
Christopher
Am 24.02.2009 um 03:32 schrieb Andrew E. Davidson:
Following the code example in SpeakHere for dealing with interrupts
I init my audio session as follows
AudioSessionInitialize ( NULL, NULL, interruptionListenerCallback,
self );
AudioSessionPropertyListener
( kAudioSessionProperty_AudioRouteChange,
audioRouteChangeListenerCallback, self );
I notice that in my code my audioRouteChangeListenerCallback was
getting based inClientData, the object was already deallocated. No
problem an easy fix was to call
AudioSessionRemovePropertyListenerWithUserData()
I assume I will eventually have the same problem with my
interruptionListenerCallback.
Any idea how I can unregister my interruptionListenerCallback?
Thanks
Andy
_______________________________________________
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
_______________________________________________
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
_______________________________________________
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