Hi all,
I want to be notified if headphones are plugged in or plugged out. I'm currently doing this using a property listener like this:
AudioSessionAddPropertyListener (kAudioSessionProperty_AudioRouteChange, myCallback, self);
This works perfectly well in all cases except in one, it goes like this:
- Launch, iPhone is unmuted, no headphones plugged in
- Switch the mute button on: The callback is called, good
- Plug in the headphones now: Callback is not called, not good
Is there another property I should consider? Is there a special case involving the mute button I'm not aware of?
I'm using an iPhone 3GS and iOS 4.1.
Thanks a lot for any help! Patrick