views:

58

answers:

1

Could someone explain to me how OpenAL fits in with the schema of sound on the iPhone?

There seem to be APIs at different levels for handling sound. The higher level ones are easy enough to understand.

But my understanding gets murky towards the bottom. There is Core Audio, Audio Units, OpenAL.

What is the connection between these? Is openAL the substratum, upon which rests Core Audio (which contains as one of its lower-level objects Audio Units) ?

OpenAL doesn't seem to be documented by Xcode, yet I can run code that uses its functions.

NEED TAG: Audio-Units

A: 

This is what I have figured out:

The substratum is Core Audio. Specifically, Audio Units.

So Audio Units form the base layer, and some low-level framework has been built on top of this. And the whole caboodle is termed Core Audio.

OpenAL is a multiplatform API -- the creators are trying to mirror the portability of OpenGL. A few companies are sponsoring OpenAL, including Creative Labs and Apple!

So Apple has provided this API, basically as a thin wrapper over Core Audio. I am guessing this is to allow developers to pull over code easily. Be warned, it is an incomplete implementation, so if you want OpenAL to do something that Core Audio can do, it will do it. But otherwise it won't.

Kind of counterintuitive -- just looking at the source, it looks as if OpenAL is lower level. Not so!

Ohmu