Record and play audio from iPod

I am trying to record and play audio in a universal application. AVAudioSession Configuration:

[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord error: nil]; 
UInt32 category = kAudioSessionCategory_PlayAndRecord;  
AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(category), &category);

This works great for devices with a built-in microphone. But on the third-generation iPod, I experience occasional unwanted behavior. Sometimes everything works fine, and sometimes it only happens when headphones with a built-in microphone are connected. In this case, it is impossible to listen to sound in the application without headphones.

+3
source share
1 answer

The third generation iPod Touch does not have a built-in microphone. The only way to have it is to connect the headphones with a microphone. The only generation of iPod Touch with built-in microphone is the fourth.

, :

UInt32 propertySize, micConnected;
AudioSessionGetProperty(kAudioSessionProperty_AudioInputAvailable, &propertySize, &micConnected);
0

All Articles