how to record audio as mp3 file by using AvAudiorecorder.i m using following code for recorder setting
recordSetting1 = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInt:AVAudioQualityMin],AVEncoderAudioQualityKey,
[NSNumber numberWithInt:16],
AVEncoderBitRateKey,
[NSNumber numberWithInt: 2],
AVNumberOfChannelsKey,
[NSNumber numberWithFloat:44100.0],
AVSampleRateKey,nil];
Add
However it's impossible to encode mp3 format at IPhone because of royalty.
Whilst you can play MP3 files using
AVAudioPlayer
, you can't record in MP3 format withAVAudioRecorder
(see this SO post and this SO post). If you need a compressed format, but it doesn't have to be MP3, I suggest recording in AAC format.