What is the recommended audio format for storing and playing back short (2-3 sec) audio sound effects on the iPhone or iToouch?
The iPhone audio SDK documentation indicates that the iPhone supports audio in several formats - however there are drawbacks to each:
Any recommendations would be appreciated... it would also be helpful if someone could recommend a reasonably priced tool for processing audio that can generate the recommended format. Thanks.
You can use IMA4 compressed files, which provide a 1:4 compression from WAV files and are decompressed by hardware (you can load them with an AVAudioPlayer
).
As for MP3, you can only play one file simultaneously in that format, that's why it's not recommended for sound effects where you could have more than one at the same time.
I'm using IMA4 files with OpenAL, so I'm decompressing them manually with a code based on this post.