avaudiorecorder distorts sound when played after recording
i have used an avaudiorecoder to record user's voice. it records it but when i play it the sound is crackled. any help regarding this will be appreciated..... following the code of my recorder's settings..
NSDictionary *recordSetting =[[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithIn开发者_开发知识库t:kAudioFormatAppleIMA4],AVFormatIDKey,
[NSNumber numberWithInt:16000.0],AVSampleRateKey,
[NSNumber numberWithInt: 1],AVNumberOfChannelsKey,
[NSNumber numberWithInt:16],AVLinearPCMBitDepthKey,
[NSNumber numberWithBool:NO],AVLinearPCMIsBigEndianKey,
[NSNumber numberWithBool:NO],AVLinearPCMIsFloatKey,
[NSNumber numberWithInt:AVAudioQualityMax],AVEncoderAudioQualityKey,
nil];
Why do you use a sample rate of 16000 Hz? Could it be noisy because the sample rate is not fast enough? When using PCM the usual sample rate is 44100 Hz. Maybe this other post helps you: How do I record audio on iPhone with AVAudioRecorder?
精彩评论