iosaudioavaudiorecorderavaudiosessionsuppression

AVAudioRecorder cutting out on low sounds


I'm using AVAudioRecorder for an IPad app to capture sound from a speaker who is doing a presentation. It works great as long as the speaker is close to the IPad and speaking at a good volume. If the speaker's volume decreases or if the speaker gets too far away from the IPad, the recording cuts out. It will pick up the sound again if the speaker increases their volume. I'm not sure if this is some sort of noise suppression but is there a way I can force the recorder to never cut out?

This is how I am setting up my AVAudioRecorder,

    NSDictionary *recordSetting = @{AVFormatIDKey:@(kAudioFormatMPEG4AAC), AVSampleRateKey:@(22050.0), AVNumberOfChannelsKey:@(1), AVEncoderAudioQualityKey:@(AVAudioQualityMedium)};
    AVAudioRecorder *recorder = [[AVAudioRecorder alloc] initWithURL:url settings:recordSetting error:NULL];
    recorder.delegate = self;
    recorder.meteringEnabled = YES;
    [recorder prepareToRecord];

Then when the user presses the record button I call,

[_recorder record];

Ideally, once the user presses record, the sound would be recorded even if it is very quite and hard to make out.


Solution

  • Turns out this was an issue with the microphone I was using to record on the simulator, it had a setting that cancelled sound below a certain level. Once I tested it on the IPad, the AVAudioRecorder captured all the sounds without cutting out.