Portable 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.
An early diagram of the cardioid listener polar pattern - this draft was roughed up with a short program in Sinclair Spectrum ZX BASIC; the book includes equivalent C++ and vector-graphic renditions