【发布时间】:2012-06-06 13:10:55
【问题描述】:
我正在尝试使用以下设置使用 AVAudiorecorder 录制 wav 文件。创建的文件在我的 Mac 和 iPhone 上可以正常播放,但是当我将它邮寄到黑莓设备并尝试从那里播放时,它说格式不受支持..我可能做错了什么? 我相信我在初始化录音机的设置时遗漏了一些东西,所以我只发布设置字典
NSDictionary *settings = [[NSDictionary alloc] initWithObjectsAndKeys:
[NSNumber numberWithFloat: 44100.0],AVSampleRateKey,
[NSNumber numberWithInt: kAudioFormatLinearPCM],AVFormatIDKey,// kAudioFormatLinearPCM
[NSNumber numberWithInt:16],AVLinearPCMBitDepthKey,
[NSNumber numberWithInt: 2], AVNumberOfChannelsKey,
[NSNumber numberWithBool:NO],AVLinearPCMIsBigEndianKey,
[NSNumber numberWithBool:NO],AVLinearPCMIsFloatKey,
[NSNumber numberWithInt: AVAudioQualityMedium],AVEncoderAudioQualityKey,nil];
【问题讨论】:
标签: iphone ios avaudiorecorder