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

# XMA2STREAMFORMAT

> XMA2STREAMFORMAT

# XMA2STREAMFORMAT

Used in XMA2WAVEFORMAT for per-stream data.

## Syntax

```cpp theme={null}
typedef struct XMA2STREAMFORMAT {  
    BYTE Channels;  
    BYTE RESERVED;  
    WORD ChannelMask;  
} XMA2STREAMFORMAT  
```

### Members

*Channels*\
Type: BYTE

Number of channels (1 or 2) in the stream.

*RESERVED*\
Type: BYTE

Reserved.

*ChannelMask*\
Type: WORD

Spatial positions of the channels in the stream.

The least-significant bit corresponds to the front-left speaker, the next least-significant bit corresponds to the front-right speaker, and so on. The bits, in the order of significance, are defined as follows.

| Speaker position                  | Flag bit                                                                        |
| --------------------------------- | ------------------------------------------------------------------------------- |
| SPEAKER\_FRONT\_LEFT              | 0x1                                                                             |
| SPEAKER\_FRONT\_RIGHT             | 0x2                                                                             |
| SPEAKER\_FRONT\_CENTER            | 0x4                                                                             |
| SPEAKER\_LOW\_FREQUENCY           | 0x8                                                                             |
| SPEAKER\_BACK\_LEFT               | 0x10                                                                            |
| SPEAKER\_BACK\_RIGHT              | 0x20                                                                            |
| SPEAKER\_FRONT\_LEFT\_OF\_CENTER  | 0x40                                                                            |
| SPEAKER\_FRONT\_RIGHT\_OF\_CENTER | 0x80                                                                            |
| SPEAKER\_BACK\_CENTER             | 0x100                                                                           |
| SPEAKER\_SIDE\_LEFT               | 0x200                                                                           |
| SPEAKER\_SIDE\_RIGHT              | 0x400                                                                           |
| SPEAKER\_TOP\_CENTER              | 0x800                                                                           |
| SPEAKER\_TOP\_FRONT\_LEFT         | 0x1000                                                                          |
| SPEAKER\_TOP\_FRONT\_CENTER       | 0x2000                                                                          |
| SPEAKER\_TOP\_FRONT\_RIGHT        | 0x4000                                                                          |
| SPEAKER\_TOP\_BACK\_LEFT          | 0x8000                                                                          |
| SPEAKER\_TOP\_BACK\_CENTER        | 0x10000                                                                         |
| SPEAKER\_TOP\_BACK\_RIGHT         | 0x20000                                                                         |
| SPEAKER\_ALL                      | 0x80000000 (used to specify any possible permutation of speaker configurations) |

The following speaker configurations are defined.

| Speaker configuration               | Flag bits set                                                                                                                                                                                                                      |
| ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| KSAUDIO\_SPEAKER\_MONO              | (SPEAKER\_FRONT\_CENTER)                                                                                                                                                                                                           |
| KSAUDIO\_SPEAKER\_STEREO            | (SPEAKER\_FRONT\_LEFT \| SPEAKER\_FRONT\_RIGHT)                                                                                                                                                                                    |
| KSAUDIO\_SPEAKER\_QUAD              | (SPEAKER\_FRONT\_LEFT \| SPEAKER\_FRONT\_RIGHT \| \ SPEAKER\_BACK\_LEFT \| SPEAKER\_BACK\_RIGHT)                                                                                                                                   |
| KSAUDIO\_SPEAKER\_SURROUND          | (SPEAKER\_FRONT\_LEFT \| SPEAKER\_FRONT\_RIGHT \| \ SPEAKER\_FRONT\_CENTER \| SPEAKER\_BACK\_CENTER)                                                                                                                               |
| KSAUDIO\_SPEAKER\_5POINT1           | (SPEAKER\_FRONT\_LEFT \| SPEAKER\_FRONT\_RIGHT \| \ SPEAKER\_FRONT\_CENTER \| SPEAKER\_LOW\_FREQUENCY \| \ SPEAKER\_BACK\_LEFT \| SPEAKER\_BACK\_RIGHT)                                                                            |
| KSAUDIO\_SPEAKER\_7POINT1           | (SPEAKER\_FRONT\_LEFT \| SPEAKER\_FRONT\_RIGHT \| \ SPEAKER\_FRONT\_CENTER \| SPEAKER\_LOW\_FREQUENCY \| \ SPEAKER\_BACK\_LEFT \| SPEAKER\_BACK\_RIGHT \| \ SPEAKER\_FRONT\_LEFT\_OF\_CENTER \| SPEAKER\_FRONT\_RIGHT\_OF\_CENTER) |
| KSAUDIO\_SPEAKER\_5POINT1\_SURROUND | (SPEAKER\_FRONT\_LEFT \| SPEAKER\_FRONT\_RIGHT \| \ SPEAKER\_FRONT\_CENTER \| SPEAKER\_LOW\_FREQUENCY \| \ SPEAKER\_SIDE\_LEFT \| SPEAKER\_SIDE\_RIGHT)                                                                            |
| KSAUDIO\_SPEAKER\_7POINT1\_SURROUND | (SPEAKER\_FRONT\_LEFT \| SPEAKER\_FRONT\_RIGHT \| \ SPEAKER\_FRONT\_CENTER \| SPEAKER\_LOW\_FREQUENCY \| \ SPEAKER\_BACK\_LEFT \| SPEAKER\_BACK\_RIGHT \| \ SPEAKER\_SIDE\_LEFT \| SPEAKER\_SIDE\_RIGHT)                           |

The following DVD speaker positions are defined.

| Speaker position                        | Flag bit                |
| --------------------------------------- | ----------------------- |
| KSAUDIO\_SPEAKER\_GROUND\_FRONT\_LEFT   | SPEAKER\_FRONT\_LEFT    |
| KSAUDIO\_SPEAKER\_GROUND\_FRONT\_CENTER | SPEAKER\_FRONT\_CENTER  |
| KSAUDIO\_SPEAKER\_GROUND\_FRONT\_RIGHT  | SPEAKER\_FRONT\_RIGHT   |
| KSAUDIO\_SPEAKER\_GROUND\_REAR\_LEFT    | SPEAKER\_BACK\_LEFT     |
| KSAUDIO\_SPEAKER\_GROUND\_REAR\_RIGHT   | SPEAKER\_BACK\_RIGHT    |
| KSAUDIO\_SPEAKER\_TOP\_MIDDLE           | SPEAKER\_TOP\_CENTER    |
| KSAUDIO\_SPEAKER\_SUPER\_WOOFER         | SPEAKER\_LOW\_FREQUENCY |

## Remarks

This structure is used in `XMA2WAVEFORMAT` for per-stream data. As shown in the code example below, `Channels` refer to the number of channels in the stream. `ChannelMask` is for spatial positions of the channels in the stream.

```cpp theme={null}
typedef struct XMA2STREAMFORMAT
{
    BYTE Channels;           // Number of channels in the stream (1 or 2)
    BYTE RESERVED;           // Reserved for future use
    WORD ChannelMask;        // Spatial positions of the channels in the stream
} XMA2STREAMFORMAT;

```

For more information about XMA2, see [Overview of XMA2](/build/console-features/audio/overviews/xma2-overview). For an overview of the audio architecture of XBOX One, see **The sound of the future**: [The audio architecture in XBOX One](/build/console-features/audio/overviews/xbox-one-audio-architecture).

## Requirements

**Header:** xma2defs.h

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

## See also

[xma2defs](/reference/audio/xma2defs/xma2defs_members)


## Related topics

- [XMA2Defs](/reference/audio/xma2defs/xma2defs_members.md)
- [XMA2WAVEFORMAT](/reference/audio/xma2defs/structs/xma2waveformat.md)
- [XMA2WAVEFORMATEX](/reference/audio/xma2defs/structs/xma2waveformatex.md)
- [XMA2PACKET](/reference/audio/xma2defs/structs/xma2packet.md)
- [Overview of XMA2](/build/console-features/audio/overviews/xma2-overview.md)
