SoundEngine of Apple – nice source for play small sounds in game and other applications. (Crash Landing)

Support caf, aiff and some others formats.

But needed convert to special bitrate and KHz

This format needed for looping/repeats sound
Example:
afconvert -v -d LEI16@44100 -f caff ~/Desktop/Sound.wav ~/Desktop/Sound.caf

Other examples:
afconvert -d aac -f caff ~/Desktop/Sound.wav ~/Desktop/Sound.caf
or
afconvert -d ima4 -f caff -v ~/Desktop/Sound.wav ~/Desktop/Sound.caf

 
You will find source in CrashLanding,but for works source in iPhone Project 3.0 and hight you needed in the SoundEngine.cpp file delete string:

  1. goto inHandler;                                 \

in this fragment:

  1. #define AssertNoError(inMessage, inHandler)                     \
  2.             if(result != noErr)                                 \
  3.             {                                                   \
  4.                 printf("%s: %d\n", inMessage, (int)result);     \
  5.                 goto inHandler;                                 \
  6.             }

In next post i will write about methods of SoundEngine!

CrashLanding