Using the SDL_mixer extension for sound
The SDL_mixer extension has its own Mercurial repository that can be used to grab the latest source for the extension. It is located at http://hg.libsdl.org/SDL_mixer. The TortoiseHg application can again be used to clone the extension's Mercurial repository. Follow these steps to build the library:
Open up TortoiseHg and press CTRL+SHIFT+N to start cloning a new repository.
Type http://hg.libsdl.org/SDL_mixer into the source box.
The Destination will be
C:\SDL2_mixer
.Hit Clone and wait for completion.
Navigate to
C:\SDL2_mixer\VisualC\
and openSDL_mixer.vcproj
in Visual Studio 2010.As long as the x64 folder outlined in Chapter 2, Drawing in SDL was created, the project will convert with no issues.
We are going to build the library without MP3 support as we are not going to need it, and also it does not work particularly well with SDL 2.0.
Add
MP3_MUSIC_DISABLED
to the Preprocessor Definitions in the project properties, which can be found by navigating...