recording quiet noise with AVAudioRecorder - volume changes over time - why?

25 views Asked by At

I try to record a real quiet noise with AVAudioRecorder for an iPhone app.

I use these settings: AVFormatIDKey: kAudioFormatLinearPCM, AVSampleRateKey: 48000, AVNumberOfChannelsKey: 1, AVEncoderAudioQualityKey: AVAudioQuality.max.rawValue

The real quiet noise is the ticking of a wrist watch, you can hardly hear it when you listen directly to the watch by holding it close to the ear. The duration of the record is just about 10s. The record of this noise starts with low volume, and the volume increases over time. The visualisation of the record (see attached screenshot) also confirms, that the volume is low at the beginning and gets louder with the time for about the first 5s (half of the record), then it stays constant more or less. In reality the volume is constant, not increasing or decreasing. screenshot of visualised record

Why does the volume change? Any idea? Is this something LinearPCM is doing?

I tried two other formats by only changing AVFormatIDKey to other values, but then my app crashed. I tried kAudioFormatAppleIMA4 and kAudioFormatAppleLossless.

0

There are 0 answers