Skip to main content

XMA2WAVEFORMATEX

The recommended way to express the format information for XMA2 files.

Syntax

Members

wfx
Type: WAVEFORMATEX
A WAVEFORMATEX structure. NumStreams
Type: WORD
Number of audio streams: 1 or 2 channels each. ChannelMask
Type: DWORD
Spatial positions of the channels in this file. Refer to the XMA_SPEAKER* macros. SamplesEncoded
Type: DWORD
Total number of PCM samples the file decodes to. BytesPerBlock
Type: DWORD
XMA block’s size. The last block might be shorter. PlayBegin
Type: DWORD
First valid sample in the decoded audio. PlayLength
Type: DWORD
Length of the valid part of the decoded audio. LoopBegin
Type: DWORD
Beginning of the loop in decoded samples. LoopLength
Type: DWORD
Length of the loop in decoded samples. LoopCount
Type: BYTE
Number of loop repetitions; 255 = infinite. EncoderVersion
Type: BYTE
Version of the XMA encoder that generated the file. BlockCount
Type: WORD
Number of XMA blocks in a file, which is also the number of entries in its seek table.

Remarks

This structure is fully compliant with the WAVEFORMATEX standard and contains all the information that is needed to parse and manage XMA2 files in a compact manner. The XMA2 format is compatible with XBOX 360, and the seek table needs to be ULONG byte–swapped for XBOX One. If the input is a WAVE file, then the output can be used without alteration. To byte-swap the seek table, use the following lines of code.
Consider adding lines of code to your app, for testing the functionality, then perhaps writing a separate tool for performing the swap so that no pre-processing is required of your app.

Requirements

Header: xma2defs.h Supported platforms: XBOX One family consoles and XBOX Series consoles

Conceptual documentation

See also

Overview of XMA2 XMA2WAVEFORMAT XMA2WAVEFORMATEX xma2defs
Last modified on August 20, 2026