I implemented an audio recording function using AVAudioRecorder with AVSampleRateKey as 44100.0 and saved it as .caf. After recording audio, I want the user to be able to trim the audio from both ends, if necessary. Can someone please help me implement this?
In my case, since the AVSampleRateKey is 44100.0, 44100 bytes represent 1 second of recording. Right? Therefore, if I remove these many bytes from the end, the audio will be trimmed at the end. But from trimming from the beginning, how many bytes should be skipped to keep the header intact?
It will be great if you can point me to some textbook / document.
Thank you very much in advance
source share