views:

260

answers:

3

I'm curious as to which of the available audio layers is the most performant, out of the ones available on the iPhone. Currently I've used the SystemSoundID method, and the AVAudioPlayer method, and I'm wondering if it's worth investigating AudioQueue or OpenAL...are there significant performance gains to be had?

Thanks!

+2  A: 

Audio is a complex issue, and most of it is done by hardware, so there is no performance gains in changing APIs.

The different APIs are for different tasks:

  • SystemSound is for short notification sounds (max 10 sec)
  • AudioQueue is for everything longer than a SystemSound
  • AVAudioPlayer is just an Objective-C layer above AudioQueue, and you don't lose any performance for this layer. (So if AVAudioPlayer is working for you, stay with it!)
  • OpenAL is for sound effects.
catlan
A: 

What about FMOD for the iPhone? It's mostly used for game development and availible for various platforms.

Alexander
A: 

I've been reading about very low level and very low latency audio using RemoteIO. Take a look at this article and subsequent (long) discussion : Using RemoteIO audio units. I wouldn't recommend going down this path unless the higher level libraries completely fail for your application. The author found very distinct performance differences between the different approaches - some quite unexpected. YMMV

John Fricker