我正在使用AVAudioRecorder录制音频。我使用了下面的代码:
[AVAudioRecorder分配initWithURL:输出文件NULL设置:记录设置错误:空];
我想知道如果我将recordSetting作为nil传递,那么这个记录器使用的默认记录设置是什么。我的意思是,如果我们将设置参数作为nil传入,AVFormatIDKey、AVSampleRateKey、AVEncoderBitRateKey、AVNumberOfChannelsKey和AVAudioQualityMax的值将是什么。
我需要这些键的默认值。
如果有任何帮助,我将不胜感激。
发布于 2014-03-28 19:00:49
以下是您可以设置的默认录像机设置。
NSMutableDictionary recordSetting = [[NSMutableDictionary alloc] init];
[recordSetting setValue:[NSNumber numberWithInt:kAudioFormatMPEG4AAC] forKey:AVFormatIDKey];
[recordSetting setValue:[NSNumber numberWithFloat:44100.0] forKey:AVSampleRateKey];
[recordSetting setValue:[NSNumber numberWithInt: 2] forKey:AVNumberOfChannelsKey];发布于 2017-10-26 18:46:57
默认AVAudioRecorder设置如下;
defaultSettings = {
AVFormatIDKey = 1768775988;
AVLinearPCMBitDepthKey = 16;
AVLinearPCMIsBigEndianKey = 0;
AVLinearPCMIsFloatKey = 0;
AVNumberOfChannelsKey = 2;
AVSampleRateKey = 44100;
};https://stackoverflow.com/questions/22710791
复制相似问题