Joel Martinez

So I've gone through the various multi-threading presentations from the GameFest downloads trying to understand how best to structure my game. All is well so far, the concepts map over to the managed world pretty easy ... and I've even gotten myself a creator's club sub, so I'll get to try all this on the 360 shortly.

One recurring thing that I noticed in the "Case studies" of existing/shipped games that one of the presentations did is that many of those games dedicated an entire core to "XAudio". So I was wondering if, for an xna game of similar complexity, one might be able to follow their lead.

If so, how would one ship the audio processing to the other core ... is it as simple as having a thread that calls the update method of the AudioEngine



Re: XNA Framework XAudio <--> XACT API?

Shawn Hargreaves - MSFT

The heavy lifting of playing audio on Xbox happens on hardware thread 4 (the second thread of core #2) so this will be nicely multithreaded by default.





Re: XNA Framework XAudio <--> XACT API?

Joel Martinez

oh really ... well :-) that rocks.





Re: XNA Framework XAudio <--> XACT API?

Shawn Hargreaves - MSFT

Depending on how complicated your XACT cues are, there could be some gain to calling AudioEngine.Update on a different thread as well, but I suspect that will be minimal.

The thing that is already multithreaded is the low level work of mixing the sound data. The logic of interpreting the XACT cue settings and translating them into low level volumes and triggers will happen inside AudioEngine.Update. That work is unlikely to take very long, but I guess it could if you had millions of crazy curves and variables and things set up inside the XACT tool.