我曾按照苹果xcode示例录制语音音频文件。在我调整了几个参数后,我想要一个采样率为16000且音频通道为1的音频文件。但是,我无法实现。专家,请帮忙。谢谢。
[recordSetting setValue :[NSNumber numberWithInt:kAudioFormatLinearPCM] forKey:AVFormatIDKey];
[recordSetting setValue:[NSNumber numberWithInt:kAudioFormatLinearPCM] forKey:AVFormatIDKey];
[recordSetting setValue:[NSNumber numberWithFloat:16000.0f] forKey:AVSampleRateKey];
[recordSetting setValue:[NSNumber numberWithInt:1 ] forKey:AVNumberOfChannelsKey]; //mono
[recordSetting setValue:[NSNumber numberWithInt:16] forKey:AVLinearPCMBitDepthKey];
[recordSetting setValue:[NSNumber numberWithBool:0] forKey:AVLinearPCMIsFloatKey];