Thursday, October 5, 2023
HomeiOS Developmentios - recording quiet noise with AVAudioRecorder - quantity adjustments over time...

ios – recording quiet noise with AVAudioRecorder – quantity adjustments over time – why?


I attempt to document an actual quiet noise with AVAudioRecorder for an iPhone app.

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

The actual quiet noise is the ticking of a wrist watch, you possibly can hardly hear it while you hear on to the watch by holding it near the ear. The length of the document is nearly 10s. The document of this noise begins with low quantity, and the amount will increase over time.
The visualisation of the document (see hooked up screenshot) additionally confirms, that the amount is low at first and will get louder with the time for concerning the first 5s (half of the document), then it stays fixed kind of. In actuality the amount is fixed, not rising or lowering.
screenshot of visualised document

Why does the amount change? Any thought? Is that this one thing LinearPCM is doing?

I attempted two different codecs by solely altering AVFormatIDKey to different values, however then my app crashed. I attempted kAudioFormatAppleIMA4 and kAudioFormatAppleLossless.



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments