ABSTRACT

Beneath the implementation of a game or VR application and the “logical layer” of audio systems code, common to every implementation of a title regardless of platform, lies a “physical layer” framework which mixes samples, also adjusting their pitch, volume and spatialisation to suit the replay environment.

The physical layer is designed to ease feature updates and porting between platforms. It may be written from scratch or implemented on top of platform-specific middleware. Sometimes the approach varies with the target platform. Since the logical layer encapsulates the physical layer, application code remains oblivious.

The runtime system configuration discussed in this chapter deals with initialisation and shutdown, channel counts, endpoints, gamepads and controllers, callbacks for logging, memory management, DMA, timing and asynchronous loading, priorities and notifications, output capture, circular and static buffers, structures of arrays versus arrays of structures, stop and starvation detection. It considers Android AudioDeviceInfo, Apple AVAudioSession, DirectSound3D, Nintendo AX, Ogg Vorbis, OpenAL, Sony Scream, Windows WASAPI, Wii-U, XAudio and Xbox wrappers. Subsequent chapters explain how mixing, filtering and other audio processes fit within this framework.