【发布时间】:2014-11-27 21:03:39
【问题描述】:
我的代码在 iOS 8 kAudioFormatMPEG4AAC 之前运行良好,但现在它创建了一个空文件。没有错误报告。当我将其更改为 kAudioFormatLinearPCM 时,它可以工作。这是我的代码:
recordSettings = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInt:AVAudioQualityMin], AVEncoderAudioQualityKey,
[NSNumber numberWithInt: kAudioFormatLinearPCM], AVFormatIDKey,
[NSNumber numberWithInt:16], AVEncoderBitRateKey,
[NSNumber numberWithInt: 1], AVNumberOfChannelsKey,
[NSNumber numberWithFloat:32000.0], AVSampleRateKey,
nil];
【问题讨论】:
标签: ios objective-c ios8 avfoundation avaudioplayer