Question

I'm using AVAudioRecorder in the AVFoundation framework. I'm wondering how I can check for a microphone device being plugged in (on the iPod Touch)?

Was it helpful?

Solution

Device Support section of the iPhone Application Programming Guide is your friend

In iPhone OS 3.0 and later, use the AVAudioSession class to determine if audio input is available. This class accounts for many different sources of audio input on iPhone OS–based devices, including built-in microphones, headset jacks, and connected accessories. For more information, see AVAudioSession Class Reference.

OTHER TIPS

BOOL inputAvailable = [[AVAudioSession sharedInstance] inputIsAvailable];

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top