AVAudioRecorder相关参数

AVAudioRecorder 相关参数

 

NSMutableDictionary *setting = [NSMutableDictionary dictionary];
    [setting setValue:[NSNumber numberWithInt:kAudioFormatMPEG4AAC] forKey:AVFormatIDKey];//音乐格式
    [setting setValue:[NSNumber numberWithFloat:8000.0] forKey:AVSampleRateKey];//音乐采样率
    [setting setValue:[NSNumber numberWithInt:1] forKey:AVNumberOfChannelsKey];//音乐通道数
    [setting setValue:[NSNumber numberWithInt:1] forKey:AVEncoderBitRateKey];//音频比特率
    [setting setValue:[NSNumber numberWithInt:1] forKey:AVEncoderBitRatePerChannelKey];//标识每通道的音频比特率
    
    self.recorder = [[[AVAudioRecorder alloc]initWithURL:recordedFile settings:setting error:nil]autorelease];
 

你可能感兴趣的:(order)