Ios AVAudioRecorder默认记录设置

Ios AVAudioRecorder默认记录设置,ios,avfoundation,avaudiorecorder,recording,Ios,Avfoundation,Avaudiorecorder,Recording,我正在使用AVAudioRecorder录制音频。我正在使用以下代码: [[AVAudioRecorder alloc]initWithURL:outputFileURL设置:记录设置错误:NULL] 我想知道如果我将recordSetting传递为nil,那么此记录器使用的默认记录设置是什么。我的意思是,如果我们将settings参数传递为nil,那么AVFormatIDKey、AVSampleRateKey、avencoderbitractekey、AVNumberOfChannelsKey

我正在使用AVAudioRecorder录制音频。我正在使用以下代码:

[[AVAudioRecorder alloc]initWithURL:outputFileURL设置:记录设置错误:NULL]

我想知道如果我将recordSetting传递为nil,那么此记录器使用的默认记录设置是什么。我的意思是,如果我们将settings参数传递为nil,那么AVFormatIDKey、AVSampleRateKey、avencoderbitractekey、AVNumberOfChannelsKey和avaudioqalitymax的值将是多少

我需要这些键的默认值


非常感谢您的帮助。

以下是您可以设置的默认录音机设置

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];

默认AVAudioRecorder设置如下:

defaultSettings =     {
    AVFormatIDKey = 1768775988;
    AVLinearPCMBitDepthKey = 16;
    AVLinearPCMIsBigEndianKey = 0;
    AVLinearPCMIsFloatKey = 0;
    AVNumberOfChannelsKey = 2;
    AVSampleRateKey = 44100;
};