Why you should use CAF instead of AIF & WAV?
July 7, 2009 § 2 Comments
iPhone OS have a native audio file format, the Core Audio Format (or CAF) file format. It is available in iphone OS 2.0 +. it can contain any audio data format supported on a platform. CAF files have no size restrictions—unlike .aif and .wav files—and can support a wide range of metadata, such as channel information and text annotations.
This is command line to convert audio into Little-Endian 16-it 44,100 sample rate format in .caf.
/usr/bin/afconvert -f caff -d LEI16@44100 inputSoundFile.aiff outputSoundFile.caf
It seems like Audio Toolbox methods handle multiple formats. However, if you use the audio in the right format then iphone won’t have to do it at play time.
Audio Toolkit is fine if you have a button and simple UI interaction. It doesn’t play immediately. You can’t match specific frame with specific sound effects. It is late by many frames or the entire audio will pause and wait for audio toolbox to load the sound into the buffer. It is just not good for game or music app.
hi, what would you suggest for a music app instead of audio toolkit?
Prob wave for a music app in general. Can’t give you the best recommendation until I fully understand your app design.