> ## 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.

# XMASTREAMFORMAT

> XMASTREAMFORMAT

Used in [XMAWAVEFORMAT](https://docs.xbox.com/reference/audio/xma2defs/structs/xmawaveformat.md) for per-stream data.

## Syntax

```cpp theme={null}
typedef struct XMASTREAMFORMAT {  
    DWORD PsuedoBytesPerSec;  
    DWORD SampleRate;  
    DWORD LoopStart;  
    DWORD LoopEnd;  
    BYTE SubframeData;  
    BYTE Channels;  
    WORD ChannelMask;  
} XMASTREAMFORMAT  
```

### Members

*PsuedoBytesPerSec*\
Type: DWORD

Used by the XBOX Media Audio (XMA) encoder. The typo is preserved for legacy reasons.

*SampleRate*\
Type: DWORD

The stream's decoded sample rate. In XMA2 files, this is the same for all streams in the file.

*LoopStart*\
Type: DWORD

Bit offset of the frame that contains the loop start, relative to the beginning of the stream.

*LoopEnd*\
Type: DWORD

Bit offset of the frame that contains the loop end.

*SubframeData*\
Type: BYTE

The two four-bit numbers that specify the exact location of the loop points within the frames that contain them.

* SubframeEnd: subframe of the loop end frame where the loop ends. Ranges from 0 to 3.
* SubframeSkip: subframes to skip in the start frame to reach the loop. Ranges from 0 to 4.

*Channels*\
Type: BYTE

Number of channels in the stream: 1 or 2.

*ChannelMask*\
Type: WORD

Spatial positions of the channels in the stream.

## 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

- [XMA2Defs](https://docs.xbox.com/reference/audio/xma2defs/xma2defs_members.md)
- [XMAWAVEFORMAT](https://docs.xbox.com/reference/audio/xma2defs/structs/xmawaveformat.md)
