I play AudioSessions on iOS, and I want to use the iphone's built-in microphone as an audio input route, even if an external headset (including a microphone) is connected. I can determine if a headset is connected using the following code:
CFStringRef route; UInt32 propertySize = sizeof(CFStringRef); AudioSessionInitialize(NULL, NULL, NULL, NULL); AudioSessionGetProperty(kAudioSessionProperty_AudioRoute, &propertySize, &route); if((route == NULL) || (CFStringGetLength(route) == 0)){
So any ideas how to do this?
ios objective-c iphone
Diffy
source share