Chapter 6. Sound

Though sometimes overlooked, sound is an important component of games. Whether it’s to provide audio cues to gameplay situations or enhance the overall atmosphere, games lose a great deal without quality sound. To experience how important sound is, try playing one of your favorite games on mute—something is definitely lost if the sound is disabled.

This chapter first covers how source data is translated into “cues” that are played back by the game code. It then moves on to more advanced sound techniques, such as the Doppler effect, digital signal processing, and sound occlusion, that might be used in certain situations.

Basic Sound

At the most basic level, sound in a game could simply involve playing back standalone sound files ...

Get Game Programming Algorithms and Techniques: A Platform-Agnostic Approach 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.