[Openal] GameAudio API for Mac OS X!

Ian Ollmann iano at cco.caltech.edu
Tue Jan 13 01:41:54 PST 2004


On Tue, 13 Jan 2004, Ryan C. Gordon wrote:

> CoreAudio, in my opinion, has a lot of unnecessary overhead. I'd love to
> get down to a lower level of the OS and bypass CoreAudio altogether, but
> I'm not sure if talking to audio devices through IOKit is feasible...it's
> certainly not documented.

I assume you've looked at HAL? Do you mean completely bypass it?

> First things first, forcing developers to use Float32 audio buffers is a
> really bad design decision. There are, I have no doubt, applications that
> need that sort of precision, but most do not, and float-to-int conversions
> are insanely expensive on the PowerPC...

They are pretty cheap using AltiVec, and can be reasonably cheap in scalar
code when hand coded.  I think in the long run, floating point will be
seen as the right way to go, just as video formats are slowly moving
towards floating point. There are currently hardware accelerated video
cards that do 16 and 32 bit floating point. Much of the problem right now
is that at both ends of the audio problem (hardware and external
software/file formats) there is a lot of integer legacy.  Still movement
in this direction is unmistakable. Sophisticated audio codecs like mp3/AAC
usually do most of their work internally as floating point, when that
facility is available. A number of pro audio apps use floating point
internally, double precision in some places. On G5 there is even reason to
think that raw computation speed may be faster in floating point than
integer in the scalar units, when memory access is not a problem.

When iTunes is playing, the overall CoreAudio load on the CPU is 0.3%, and
the conversion function (Float32toNativeInt16) is 0.15%.  Is this is
really the biggest problem you face? If so, I'm sure it could be made less
with AltiVec.

I do like the reverbs in EAX.

Ian

---------------------------------------------------
   Ian Ollmann, Ph.D.       iano at cco.caltech.edu
---------------------------------------------------




More information about the Openal mailing list