Friday, May 29, 2009

SoundEngine 2.0.3 update

I've uploaded a newer version of the SoundEngine code - version 2.0.3. This provides a few memory leak fixes courtesy of an email I received from HeeHun Kang.

You can read more about the free library code here. The main point of it is to provide a fairly simple method for playing multiple sound effects and background music in an iPhone app using OpenAL. You are welcome to use this code for free however you'd like.

I'm now using this code in a few apps of mine, so I plan on maintaining it for the foreseeable future. I'll post updates and improvements as I make them.

At some point, if I have the spare cycles, I'd like to rewrite the whole library. Right now, as I've mentioned in the past, it's based on the SoundEngine 1.7 code from Apple and it isn't the best example of coding out there. But, I needed something on short notice so modifying it was my best option at the time.

One tip: you need to have the sound effects in the proper format in order to be usable with this code. The following command will convert an audio CAF file to the necessary format:

afconvert -f caff -d LEI16@44100 originalfile.caf convertedfile.caf

The above assumes you have initialized the sound engine to use 44.1Mhz. If you are using a different frequency, adjust the command accordingly.

No comments:


All content copyright © 2009  Brian Stormont, unless otherwise noted.   All rights reserved.