tags:

views:

33

answers:

1

I am using XNA to develop a game which requires both sound effects and music. I'm trying to figure out how to implement the sound engine. Microsoft provides the ability to use the Content Pipeline to load and play audio. However, I also seen people use Xact to do the same thing. My question is, whats the difference and what would be the better approach to making a sound engine?

+3  A: 

Xact is feature rich but complex to use. It was originally the only way to play sound but people wanted something simpler so Microsoft added the content pipeline method.

Use the Content Pipeline if you want:

  • To play a sound (2d or 3d)
  • To not have to invest a lot of time learning an audio framework

Use Xact if you want:

  • Categories of sounds that can be interdependently controlled, like mute game sounds but not menu sounds
  • Real time advanced control over sound pitch, volume. For things like turrets spinning up, cars accelerating etc.
  • To have multiple varieties of a single sound effect like a seven different pain sounds and have Xact choose which one to play.
  • To have a sound play with slightly different pitch, volume, filter or 3d pan every time it is played. This is really good for bullets and repetitive things like that. There is nothing that says fake computer simulation like a repeating sound with no variance.
  • To allow a game designer or sound designer full control to edit and change sounds without touching the code.
  • To have sound banks (collections of sound) that you can load or unload as a group, which can use different compression settings and can be in memory or streaming.
  • To mix the volume, pitch and priority of sounds in an editor.
  • To apply filtering to a sound.
  • To control whether the sound is looping or not.
  • To use DSP Effects

One of my favourite things about Xact is editing and previewing of sound functions in editor. For example a volume fade on a turret overheat sound. With XACT you can sit down with the sound designer, even if he's not a technical guy and edit the control curves until he's happy with the sound. Once you've set it up it's really easy to change later on. In this example image here a turret is overheated. At the end of the overheat cycle the hissing steam noise volume is reduced, but because it's a curve I have a lot of control over how the sound fades out. I've used this with a beam weapon as well, dropping the frequency according to a curve as it runs out of ammo.

alt text

Empyrean