Objects, Voices, Sources
and Handles
Every sound that might be heard is associated with a Virtual Voice object. Since these can stop or change state at any time, they are indirectly but efficiently accessed via
smart pointers, preventing references to stale data. This central chapter of the book introduces short snippets of C++ code which fit together to implement key aspects of the audio runtime system described.
Each Virtual Voice has 17 public properties accessible to the designer and a further 20 'private' ones used to implement it. This chapter lists those and describes what they're for from the points of view of both programmers and sound designers.
Concepts
- How voices, groups, listeners and outputs fit together
- Virtual Voice priorities and their interpretation
- Sample and stream initialisation structures
- Bulk initialisation with the default voice
- Integrity protection with the dummy voice
- Methods to play, stop, replace and chain together samples and streams
- Loops and one-shot sound behaviour compared
- Smart-pointer implementation of Virtual Voice handles in C++
- Error reporting, profiling and logging recommendations
- Automatic voice fading: upwards, downwards and to stop
- Turning audio off without wasting memory or recompiling
- Physical voice counts tabulated for eight PC and console games
Nintendo's Mario character momentarily trapped in a octahedronal 3D7.1 surround-sound arrangement, possibly awaiting object audio and virtual voices to guide his escape. Or maybe he'll just teleport out.Further reading
Modelling Distance - next chapter abstract.
Quick Curves - Transcendental Optimisations - previous chapter abstract.
Return to the index of chapters.
Click here to get your own copy of Beep To Boom.
Copyright © 2019 Simon N Goodwin [';']