Hi
I am trying to record audio (into a wav file) with a bit rate of 8 bits. But in my record settings, if I set the value for AVLinearPCMBitDepthKey to 8, no audio is recorded. I am using a headset for recording on an iPhone.
Can someone please tell me whats wrong with the following record settings
Code:
[recordSetting setValue :[NSNumber numberWithInt:kAudioFormatLinearPCM] forKey:AVFormatIDKey];
[recordSetting setValue:[NSNumber numberWithFloat:44100.0] forKey:AVSampleRateKey];
[recordSetting setValue :[NSNumber numberWithInt:8] forKey:AVLinearPCMBitDepthKey];
[recordSetting setValue :[NSNumber numberWithBool:NO] forKey:AVLinearPCMIsBigEndianKey];
[recordSetting setValue :[NSNumber numberWithBool:NO] forKey:AVLinearPCMIsFloatKey];
Thanks.
More Info
Found something more on debugging
The recorder object is created without any errors with the bit rate set to 8. But looks like it doesn't record. When I stop recording, the delegate method audioRecorderDidFinishRecording: is not called. The method is called when the bit rate is 16 or above.