In the previous chapter, we saw how to load and play audio files in FMOD. This time, we will explore some of the ways in which we can control the playback of those files. We will start with controlling the playback flow, by stopping the sound on demand, or seeking to different points in the audio file. Then we will cover how to modify the main properties of sound that were described in Chapter 1, Audio Concepts, such as volume and pitch. We will also see how FMOD lets us group sounds into categories, in order to control multiple sounds at once.
At the end of the chapter, we will expand the audio manager from the previous chapter, and make it more flexible and appropriate for use in games. This extended audio manager will provide a distinction between songs and sound effects, and handle each of them differently. We will see how to implement a fade in/fade out effect using simple volume manipulation, and how to add a variation to sound effects with a bit of randomness...