XAudio2 Overview

XAudio2 is a low-level audio API architecture that provides a signal processing and mixing foundation for games.

When to use XAudio2

XAudio2 is primarily intended for developing high performance audio engines for games. For game developers who want to add sound effects and background music to their modern games, XAudio2 offers an audio graph and mixing engine with low-latency and support for dynamic buffers, synchronous sample-accurate playback, and implicit source rate conversion. Compared to WASAPI, XAudio2 requires only a minimum amount of code even for complex audio solutions.

For the audio output of a video clip refer to Media Foundation.

XAudio2 is a cross-platform API set, refer to XAudio2: Getting Started.

Pause and Resume

To correctly pause XAudio2, for example as required by the user when entering constrained mode, a title should call StopEngine. When resuming a call should be made to StartEngine.

XAPOFX Effects Unique to the Xbox One XDK

XAPOFX is a collection of audio effects implementing the XAPO interfaces for use in XAudio2. XAPOFX contains several effects, and a common mechanism for creating effect instances.

The following table lists the XAPOFX effects that are unique to the Xbox One XDK.

Effect Description Parameter Structure Requirements
FXLoudness A loudness meter based on the ITU-R BS.1770-3 standard. For a usage example, see the SimplePlaySound sample on the Samples page of the Xbox Game Developer (XGD) site. This effect provides real time information to PIX through the following counters:
  • Momentary Loudness (LUFS)
  • Short Term Loudness (LUFS)
  • Integrated Loudness (LUFS)
  • Loudness Range High (LUFS)
  • Loudness Range Low (LUFS)
  • True Peak (db)
FXLOUDNESS_PARAMETERSOnly supports FLOAT32 audio formats at 48khz.