How to convert Apple IMA4 CAF file recorded with AVAudioRecorder to WAV file using Core Audio Converter Services?

Note: I'm an audio noob, so please forgive me if I say something wrong!

I need to convert Apple IMA4 CAF audio files recorded with AVAudioRecorder to WAV files from my application . The sampling rate must be maintained.

My application needs to support 3.x, so I cannot use AVAssetReader / Writer. I notice that when using AVAudioRecorder to record a Linear PCM WAV file directly, the processor is always in use (possibly due to lack of hardware encoding support) even when no audio is being recorded, so this is not an option either. The idea is that I can write to IMA4 because it uses 0% CPU when it does nothing and then converts the output file to WAV.

Core Audio Converter Services got my attention, but I just can't figure out how to use it correctly, so if anyone has used it before, could you please share some info / code on what I need to do to convert CAF files to WAV files?

+3


source to share





All Articles