Chapter 7

Audio

Though sometimes overlooked, audio is an important part of games. Whether it’s to provide audio cues for gameplay situations or enhance the overall atmosphere, quality sound adds a lot to games.

Leveraging the powerful FMOD API, this chapter covers how to bootstrap an audio system that goes well beyond simply playing sound files. Covered topics include using sound events, adding positional 3D audio, mixing sounds, and adding effects.

Bootstrapping Audio

A rudimentary game audio system loads and plays back standalone sound files (such as WAV or OGG files) as needed. Although this approach is functional—and might be perfectly acceptable for a simple 2D game—it has limitations. In many cases, a single game action does not correspond ...

Get Game Programming in C++: Creating 3D Games, First Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.