We will add some simple sound to the 2D world we made in the previous chapter. So, open Visual Studio and let's get started!
Before we get started, it should be noted that the music track we are using in this chapter (
lost_village_128.wav) is courtesy of http://wrathgames.com/blog (WrathGames Studio). So, a big thanks goes out to them.
This sound file is, of course, included in the downloadable code for this chapter.
TileGameWindow.cs file. First of all, we need to add the following
using statements to the top of the file so that we can use DirectSound:
using SlimDX.DirectSound; using SlimDX.Multimedia;
Now, we need to add some new member variables to this class. The first one we will add is a Boolean variable named