I searched a lot and couldn’t find anything relevant… I am working on iOS audio files and here is what I want to do…
- Record Audio and Save Clip (Checked, I did this using
AVAudioRecorder) - Change the pitch (Checked, Did this using Dirac)
- Trimming 🙁
I have two markers i.e. starting & ending offset and using this info I want to trim recorded file and want to save it back. I don’t want to use “seek” because later on I want to play all recorded files in sync (just like flash movie clips in timeline) and then finally I want to export as one audio file.
Here’s the code that I’ve used to trim audio from a pre-existing file. You’ll need to change the M4A related constants if you’ve saved or are saving to another format.
There’s also Technical Q&A 1730, which gives a slightly more detailed approach.