Swift AVAudioRecorder 踩坑记录 record false

配置settings,不能直接返回 AVAudioQuality.low,要返回AVAudioQuality.low.rawValue !!!
var settings: [String: Any] {
[
AVFormatIDKey: Int(kAudioFormatMPEG4AAC),
AVSampleRateKey: 44100,
AVEncoderBitRateKey: 64000,
AVNumberOfChannelsKey: 1,
AVLinearPCMBitDepthKey: 16,
AVEncoderAudioQualityKey: AVAudioQuality.low.rawValue,
]

你可能感兴趣的:(Swift AVAudioRecorder 踩坑记录 record false)