ABSTRACT

A listener is a virtual microphone placed in the simulated world. This chapter explains how interactive audio systems use multiple listeners to mix and model complex acoustic environments in 3D. Interactions between listeners, views, Virtual Voices and voice groups are noted.

Scalar code to perform transformations between world coordinates and listener-relative ones is revealed, including C++ data-structures and routines for matrix and vector arithmetic, noting memory usage, alignment, left- and right-handed and row/common-major compatibility considerations while minimising mathematical justifications irrelevant to practical use.

Quirks of Direct3D, GCC, OpenAL, Unity, Unreal Engine and Visual Studio are noted. An efficient C++ implementation of Doppler pitch shift is presented, including edge-case handling, sonic booms and temperature considerations. Directional listeners, with smooth cardioid, figure-of-eight and HRTF-modelling polar patterns, are explained and implemented, with advice on visualising them and their orientations.