[crossfire] Using openal for client audio?

Mark Wedel mwedel at sonic.net
Tue May 22 01:36:14 CDT 2007


  I ran across openal (http://www.openal.org/) a cross platform 3d audio API.

  I haven't dug really deeply into it, but it looks interesting to me in many 
regards:

- Cross platform (windows, mac, linux, solaris, and others) - this removes the 
various specialized support currently in the sound playing logic, and adds more 
platforms that the client currently has

- Takes care of sound mixing, adjustments based on location, can even do things 
like doppler shift.  Some of this logic is currently in the sound client, but 
other aspects are not.

- Related to above, can more fully utilize sound hardware.  For example, right 
now the client only does mixing/adjustment of volume presuming a 2 speaker set 
up.  If someone had a 5.1 setup, the client wouldn't make any extra use, where 
as openal would

- Is used by a fair number of mainstream games, so hardly seems like it should 
be stable and not disappear

  The only real disadvantages with this:
- Would require some work to write up using this library (OTOH, the current 
sound implementation needs some work to deal with background music, so may not 
be a big net loss)

- Adds a new dependancy for the client.  But the easy thing to do in this case 
is have a check for the library, and if it doesn't exist, compile the sound 
support with just stub functions that don't do anything (looking at the library, 
it would seem that there isn't a need to set up a separate sound playing process 
- this can do things properly on its own, which also makes things easier in 
terms of starting/stopping sounds)

  Thoughts/comments?





More information about the crossfire mailing list