Is another application on your device using the microphone when you try to launch your app? You should make sure to set the audio session category to one that supports recording, and also activate the audio session prior to calling start
on the GnAudioSourceMic
instance. For example:
NSError *error = nil;
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord error:&error];
if (error) {
NSLog(@"Error setting audio session category: %d, %@", [error code], [error description]);
}
[[AVAudioSession sharedInstance] setActive:YES error:&error];
if (error) {
NSLog(@"Error activating audio session category: %d, %@", [error code], [error description]);
}