Introduction
One of the most important aspects in games development is audio programming. However, it is, strangely, one of the most neglected and underrated sections of games development as well. To understand the impact of audio in games, try playing a game such as Counter-Strike or Quake with sounds and then try playing the games without sound. It has a huge impact. Audio programming, if not done correctly, can lead to games crashing and lots of other problems.
Therefore, it is very important to learn the correct way to do audio programming. Most engines will have a built-in sound component. For others, we need to add the audio component. In this chapter, we will have a look at one of the most popular sound engines. We will also have a look at how to integrate SDL into our C++ code, in order to play audio and sound effects.