O'Reilly logo

Getting Started with C++ Audio Programming for Game Development by David Gouveia

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Project 2 – improving the audio manager

In this project, we will build on top of the simple audio manager developed in the last chapter, and make it more flexible and game oriented. This time, besides loading and playing sounds, we will also be able to stop them and control their volume, which is necessary in almost every game. Furthermore, we will divide all sounds into two categories, each with its own set of features and behaviors:

  • Sound effects (SFXs): Sounds that are loaded into memory and do not loop. Multiple instances can be played at the same time. Their volume and pitch can be controlled directly, or randomized within a user-defined range, to add variation to the sound.
  • Songs: Sounds that are streamed and set to loop. Only one song can ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required