Decoding ima4 audio format

Posted by MrDatabase on Stack Overflow See other posts from Stack Overflow or by MrDatabase
Published on 2010-01-25T07:34:45Z Indexed on 2010/04/12 13:43 UTC
Read the original article Hit count: 943

To reduce the download size of an iPhone application I'm compressing some audio files. Specifically I'm using afconvert on the command line to change .wav format to .caf format w/ ima4 compression.

I've read this (wooji-juice.com) awesome post about this exact topic. I'm having trouble w/ the "decoding ima4 packets" step. I've looked at their sample code and I'm stuck. Please help w/ some pseudo code or sample code that can guide me in the right direction.

Thanks!

Additional info: Here is what I've completed and where I'm having trouble... I can play .wav files in both the simulator and on the phone. I can compress .wav files to .caf w/ ima4 compression using afconvert on the command line. I'm using the SoundEngine that came w/ CrashLanding (I fixed one memory leak). I modified the SoundEngine code to look for the mFormatID 'ima4'.

I don't understand the blog post linked above starting w/ "Calculating the size of the unpacked data". Why do I need to do this? Also, what does the term "packet" refer to? I'm very new to any sort of audio programming.

© Stack Overflow or respective owner

Related posts about ima4

Related posts about file-format