Getting Started with C++ Audio Programming for Game Development

Written specifically to help C++ developers add audio to their games from scratch, this book gives a clear introduction to the concepts and practical application of audio programming using the FMOD library and toolkit.

Getting Started with C++ Audio Programming for Game Development

Starting

David GouveiaAugust 2013

Written specifically to help C++ developers add audio to their games from scratch, this book gives a clear introduction to the concepts and practical application of audio programming using the FMOD library and toolkit.

Book Details

About This Book

Understand the core concepts of audio programming and work with audio at different levels of abstraction

Work with a technology that is widely considered to be the industry standard in audio middleware

Who This Book Is For

This book is perfect for C++ game developers who have no experience with audio programming and who would like a quick introduction to the most important topics required to integrate audio into a game.

Table of Contents

Chapter 1: Audio Concepts

Sound waves

Analog and digital audio

Multi-channel audio

Audio file formats

Summary

Chapter 2: Audio Playback

Understanding FMOD

Installing FMOD Ex Programmer's API

Creating and managing the audio system

Loading and streaming audio files

Playing sounds

Checking for errors

Project 1 – building a simple audio manager

Summary

Chapter 3: Audio Control

The channel handle

Controlling the playback

Controlling the volume

Controlling the pitch

Controlling the panning

Grouping channels together

Controlling groups of channels

Project 2 – improving the audio manager

Summary

Chapter 4: 3D Audio

Positional audio

Positional audio in FMOD

Reverb

Reverb in FMOD

Obstruction and occlusion

Effects

Summary

Chapter 5: Intelligent Audio

Audio files versus sound events

Introducing the FMOD Designer

Simple events

Multi-track events

Interactive music

Calling sound events from the game code

Summary

Chapter 6: Low-level Audio

Representing audio data

Playing audio data

Loading a sound

Playing a sound

Pausing a sound

Looping a sound

Changing volume

Changing pitch

Changing panning

Mixing multiple sounds

Implementing a delay effect

Synthesizing a sound

Summary

What You Will Learn

Design complex generative /interactive sounds

Simulate an environment with 3D audio and effects

Load and play audio files in several formats

Control audio playback and many sound parameters

Adapt an audio API to fit the needs of a game

In Detail

Audio plays a fundamental role in video games. From music to sound effects or dialogue, it helps to reinforce the experience, convey the mood, and give feedback to the player. Presently, many games have achieved commercial success by incorporating game sounds that have enhanced the user experience. You can achieve this in your games with the help of the FMOD library. This book provides you with a practical guide to implementing the FMOD toolkit in your games.

Getting Started with C++ Audio Programming for Game Developers is a quick and practical introduction to the most important audio programming topics that any game developer is expected to know. Whether you need to play only a few audio files or you intend to design a complex audio simulation, this book will help you get started enhancing your game with audio programs.

Getting Started with C++ Audio Programming for Game Developers covers a broad range of topics – from loading and playing audio files to simulating sounds within a virtual environment and implementing interactive sounds that react to events in the game.

The book starts off with an explanation of the fundamental audio concepts, after which it proceeds to explain how to use the FMOD Ex library, how to implement a 3D audio simulation, how to use the FMOD Designer toolkit, and how best to work with multi-layered sounds with complex behaviors attached to them. The final part of the book deals with working with audio at a much lower level by manipulating audio data directly.

This book will provide you with a good foundation so that you can successfully implement audio into your games and begin pursuing other advanced topics in audio programming with confidence.

Authors

David Gouveia

David Gouveia is a Software Engineer and Game Developer from Portugal, Madeira Island. He recently finished his MSc in Computer Science, with a specialization in graphics and multimedia, and is currently working full-time as a game programmer for a local company. He runs an educational blog about game development and enjoys sharing his knowledge with the community whenever possible. His main interests in game development are graphics and audio programming. He also has a strong interest in music and synthesizers, having played the keyboard most of his life.

Alerts & Offers

Series & Level

We understand your time is important. Uniquely amongst the major publishers, we seek to develop and publish the broadest range of learning and information products on each technology. Every Packt product delivers a specific learning pathway, broadly defined by the Series type. This structured approach enables you to select the pathway which best suits your knowledge level, learning style and task objectives.

Learning

As a new user, these step-by-step tutorial guides will give you all the practical skills necessary to become competent and efficient.

Beginner's Guide

Friendly, informal tutorials that provide a practical introduction using examples, activities, and challenges.

Essentials

Fast paced, concentrated introductions showing the quickest way to put the tool to work in the real world.

Cookbook

A collection of practical self-contained recipes that all users of the technology will find useful for building more powerful and reliable systems.

Blueprints

Guides you through the most common types of project you'll encounter, giving you end-to-end guidance on how to build your specific solution quickly and reliably.

Mastering

Take your skills to the next level with advanced tutorials that will give you confidence to master the tool's most powerful features.

Starting

Accessible to readers adopting the topic, these titles get you into the tool or technology so that you can become an effective user.

Progressing

Building on core skills you already have, these titles share solutions and expertise so you become a highly productive power user.