Game Development Reference
In-Depth Information
Tip
The XAudio2 object has many utility methods and constants that you will need in
some cases. This is also true of many of the other major DirectX objects we've
covered so far in this topic, such as the
DirectSound
object earlier in this
chapter, or the
Direct2D
object discussed in the previous chapter.
If you want to use the
.ogg
or
.mp3
files instead of the
.wav
files like we did in this
chapter, you will need to write a method to load in each file type, since you will have
to decode it before you can play it. Alternatively, you could of course convert your
files to the
.wav
format and just use them like that.