iphone - avaudiorecorder 在录制后播放时会扭曲声音

标签 iphone ios avaudioplayer avaudiorecorder

我使用了 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/

相关文章:

objective-c - 当我的 UIViewController 弹出时调用的方法?

ios - IOS 中的手势模式识别器。

iphone - sqlcipher:无法访问提供十六进制 key 的数据库

iphone - Apple 现在允许 Paypal iphone sdk 集成吗?

ios - 不允许 iOS 10 中的代码签名资源叉、Finder 信息或类似碎屑

ios - 如何在运行时更改 UIMenu 内 UIAction 的状态?

objective-c - 方法和可选参数

swift - 使用 MusicSequence 初始化 AVMIDIPlayer

ios - 如何在iOS应用程序中循环连续播放声音文件?

iphone - 如何创建只需触摸即可调用的各种按钮