Search Unity


If you're using compressed audio in your iPhone game, then you should grab Unity iPhone 1.0.3. It is a hot fix release with a single purpose - to improve performance of a compressed audio playback under the iPhone OS 3.0.

Now some technical bits. Previously we have been using the AmbientSound as an audio session category. The AmbientSound category respects silent switch and allows single compressed audio to be played via dedicated hardware decompressor. However since introduction of the iPhone OS 3.0 meaning of the AmbientSound slightly changed. Now this category allows multiple compressed audio sounds to be played, but all of them are decompressed on CPU!

That is not a big deal if you have game without CPU intensive tasks or completely GPU bound game. Otherwise performance may suffer. Instead iPhone OS 3.0 introduced a new audio session category called AmbientSoundSolo which behavior is more like an AmbientSound under the OS 2.x. That is what we need!

Unity iPhone 1.0.3 will detect OS version at the run-time and will pick audio session category for you. It is important to know that this process does NOT require you to explicitly compile for newer OS version. You should use the OS 2.x as a compile target still - it will guarantee wider audience for your game.

June 17, 2009 in Technology | 1 min. read