我使用了 avaudiorecoder 来记录用户的声音。它记录了它,但是当我播放它时,声音会噼啪作响。任何有关此的帮助将不胜感激.....遵循我的录音机设置代码..
NSDictionary *recordSetting =[[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithInt: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];
最佳答案
为什么使用 16000 Hz 的采样率?会不会因为采样率不够快而产生噪音?使用 PCM 时,通常的采样率为 44100 Hz。 也许其他帖子可以帮助您: How do I record audio on iPhone with AVAudioRecorder?
关于iphone - avaudiorecorder 在录制后播放时会扭曲声音,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5939501/