In this chapter, we will perform two of the most fundamental operations in audio programming—loading and playing audio files. This might not seem like much, but it is already enough to get us started adding audio into our games.
There are many different audio libraries available these days, such as DirectSound, Core Audio, PortAudio, OpenAL, FMOD, or Wwise. Some are available only on certain platforms, while others work almost everywhere. Some are very low-level, providing little more than a bridge between the user and the sound card driver, while others provide high-level features such as 3D sound or interactive music.
For this book, we will be using FMOD, a cross-platform audio middleware developed by Firelight Technologies that is extremely powerful, yet easy-to-use. However, you should try to focus more on the concepts covered, instead of the API, because understanding them will allow you to adapt to other libraries more easily, since a lot of this knowledge is...