> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XMA2WAVEFORMAT

> XMA2WAVEFORMAT

Legacy XMA2 format structure in big-endian byte order.

## Syntax

```cpp theme={null}
typedef struct XMA2WAVEFORMAT {  
    BYTE Version;  
    BYTE NumStreams;  
    BYTE RESERVED;  
    BYTE LoopCount;  
    DWORD LoopBegin;  
    DWORD LoopEnd;  
    DWORD SampleRate;  
    DWORD EncodeOptions;  
    DWORD PsuedoBytesPerSec;  
    DWORD BlockSizeInBytes;  
    DWORD SamplesEncoded;  
    DWORD SamplesInSource;  
    DWORD BlockCount;  
    XMA2STREAMFORMAT Streams[1];  
} XMA2WAVEFORMAT  
```

### Members

*Version*\
Type: BYTE

Version of the XMA encoder that generated the file. Always 3 or later for XMA2 files.

*NumStreams*\
Type: BYTE

Number of interleaved audio streams.

*RESERVED*\
Type: BYTE

Reserved.

*LoopCount*\
Type: BYTE

Number of loop repetitions; 255 = infinite.

*LoopBegin*\
Type: DWORD

Loop begin point, in samples.

*LoopEnd*\
Type: DWORD

Loop end point, in samples.

*SampleRate*\
Type: DWORD

The file's decoded sample rate.

*EncodeOptions*\
Type: DWORD

Options for the XMA encoder or decoder.

*PsuedoBytesPerSec*\
Type: DWORD

Used internally by the XMA encoder.

*BlockSizeInBytes*\
Type: DWORD

Size, in bytes, of this file's XMA blocks, except possibly the last one. Always a multiple of 2 KB, because XMA blocks are arrays of 2-KB packets.

*SamplesEncoded*\
Type: DWORD

Total number of PCM samples encoded in this file.

*SamplesInSource*\
Type: DWORD

Actual number of PCM samples in the source material used to generate this file.

*BlockCount*\
Type: DWORD

The number of XMA blocks in this file, and hence also the number of entries in its seek table.

*Streams*\
Type: [XMA2STREAMFORMAT](https://docs.xbox.com/reference/audio/xma2defs/structs/xma2streamformat.md)\[1]

Per-stream format information; the actual array length is in the NumStreams field.

## Remarks

> [!NOTE]
>
> This is a legacy XMA format structure. The information provided should be used for reference only and not be used in new content.

`XMAWAVEFORMAT` was the structure used in XMA version 1 files.  `XMA2WAVEFORMAT` was used in early XMA2 files. It is not placed in the usual *fmt* RIFF chunk but in its own XMA2 chunk. For more information about XMA2, see [Overview of XMA2](https://docs.xbox.com/build/console-features/audio/overviews/xma2-overview.md). For an overview of the audio architecture of XBOX One, see *The sound of the future*: [The audio architecture in XBOX One](https://docs.xbox.com/build/console-features/audio/overviews/xbox-one-audio-architecture.md).

## Requirements

**Header:** xma2defs.h

**Supported platforms:** XBOX One family consoles and XBOX Series consoles

## See also

[xma2defs](https://docs.xbox.com/reference/audio/xma2defs/xma2defs_members.md)


## Related topics

- [XMA2WAVEFORMATEX](https://docs.xbox.com/reference/audio/xma2defs/structs/xma2waveformatex.md)
- [XMA2STREAMFORMAT](https://docs.xbox.com/reference/audio/xma2defs/structs/xma2streamformat.md)
- [XMA2Defs](https://docs.xbox.com/reference/audio/xma2defs/xma2defs_members.md)
- [XMASTREAMFORMAT](https://docs.xbox.com/reference/audio/xma2defs/structs/xmastreamformat.md)
- [XMAWAVEFORMAT](https://docs.xbox.com/reference/audio/xma2defs/structs/xmawaveformat.md)
