Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

zaxonus

macrumors newbie
Original poster
Dec 23, 2010
22
0
Hello,

In an iPhone app where I want to keep track of the plug-unplug of the earphone I use the classical code:

Code:
routeChangeID=kAudioSessionProperty_AudioRouteChange;
AudioSessionAddPropertyListener(routeChangeID,handleRouteChangeCallBack,(__bridge void *)(self));

Well, though it works most of the time; I now find myself in a situation where handleRouteChangeCallBack gets called for no apparent reason that I can see.

Normally it should fire up only when I plug in or out an earphone (or maybe a headset).

Has anyone had this kind of experience? Or has anybody an idea of the issue? I can't see what I am missing.

Thanks for any help.

P.S.
I am using XCode 5 and experimenting on iOS 7.
 
Last edited by a moderator:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.