• 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: how to unregister interuptListener registered in AudioSessionInitialize() on iPhone
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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: Tue, 24 Feb 2009 13:20:17 -0800

One addition to this.

To test interruptions - use the clock alarm. We showed how to do this in last year's WWDC presentation. It will interrupt your app from the perspective of the audio system, in much the same way that a phone call does.

On Feb 23, 2009, at 7:42 PM, William Stewart wrote:

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:
@apple.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

_______________________________________________ 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
References: 
 >how to unregister interuptListener registered in AudioSessionInitialize() on iPhone (From: "Andrew E. Davidson" <email@hidden>)
 >Re: how to unregister interuptListener registered in AudioSessionInitialize() on iPhone (From: Christopher Atlan <email@hidden>)
 >Re: how to unregister interuptListener registered in AudioSessionInitialize() on iPhone (From: William Stewart <email@hidden>)

  • Prev by Date: Re: how to unregister interuptListener registered in AudioSessionInitialize() on iPhone
  • Next by Date: Re: Advice on audio file media protection?
  • Previous by thread: Re: how to unregister interuptListener registered in AudioSessionInitialize() on iPhone
  • Next by thread: Output Channel Selection Redux
  • Index(es):
    • Date
    • Thread