我正在制作一款允许用户录制音频的Mac应用。当我播放音频时,音频有环境噪音,我不知道如何减少它,如设置---声音---使用环境噪音减少。我想在我的应用程序中有一个复选框按钮来执行此操作。我对AVAudioRecorder的设置是:
// Settings for the recorder
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];
[recordSetting setValue:[NSNumber numberWithInt: AVAudioQualityMax] forKey:AVEncoderAudioQualityKey];
NSError *error;
recorder = [[AVAudioRecorder alloc] initWithURL:recordedAudioURL settings:recordSetting error:&error];
[recorder prepareToRecord];