Game Development Community

XAudio2 in TGEA 1.7.1

by Tom Spilman · in Torque Game Engine Advanced · 05/28/2008 (10:39 pm) · 1 replies

Hey guys.

So unless i run into a major stumbling block the TGEA 1.7.1 release will include an SFXDevice for XAudio2.

If your not familiar with XAudio2 this article gives you a good introduction.

In short XAudio2 is a software only sound API supported on all flavors of Windows and the Xbox 360 and is the replacement for DirectSound. Its a graph based system so multiple voices can be inputs to "submix voices" which then all go thru the master voice. Each voice (or submix voice) can have effect chains attached to them and custom effects can be written in C++ (think of it like a shader for sound samples). It has some other nifty features like realtime playback of ADPCM, XMA, WMA compressed formats. There are no limitations to the number of simultaneous voices or effects other than the amount of CPU time you want to chew up.

The effect and submix features of XAudio2 are outside the scope of the basic SFX API, so i'm looking for suggestions on how we should approach exposing them in a future TGEA release.

One idea would be to add the concept of an SFXMixSource and SFXEffect to the core SFX API. These would only be supported by the XAudio device and could be used to do environmental effects. The problem is that i don't see how that works on OSX or Linux (unless we could maybe support it via FMod).

Consider this a little open development.

Anyone else have good/bad experiences with XAudio2?

Any other ideas or suggestions for how to support it better?

About the author

Tom is a programmer and co-owner of Sickhead Games, LLC.


#1
05/29/2008 (7:04 am)
If you're going to do this with XAudio, then should definitely look into exposing the DSP Layer of FMOD