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

# GetXmaChannelMaskFromStandardMask

> GetXmaChannelMaskFromStandardMask

# GetXmaChannelMaskFromStandardMask

Converts between `WAVEFORMATEXTENSIBLE` channel masks that are combinations of `SPEAKER_xxx` flags defined in the *audiodef.h* file, XBOX Media Audio (XMA)  channel masks, and are limited to eight possible speaker positions.

## Syntax

```cpp theme={null}
BYTE GetXmaChannelMaskFromStandardMask(  
         DWORD dwStandardMask  
)  
```

### Parameters

*dwStandardMask*   \
Type: DWORD

Standard mask.

### Return value

Type: BYTE

Byte mask.

## Remarks

This function converts between `WAVEFORMATEXTENSIBLE` channel masks that are combinations of `SPEAKER_xxx` flags defined in the *audiodefs.h* file, XMA channel masks, and are limited to eight possible speaker positions.

As shown in the code example below, these speaker positions include left, right, center, low frequency, side left, side right, back left, and back right.

```cpp theme={null}
__inline BYTE GetXmaChannelMaskFromStandardMask(DWORD dwStandardMask)
{
    BYTE bXmaMask = 0;

    if (dwStandardMask & SPEAKER_FRONT_LEFT)    bXmaMask |= XMA_SPEAKER_LEFT;
    if (dwStandardMask & SPEAKER_FRONT_RIGHT)   bXmaMask |= XMA_SPEAKER_RIGHT;
    if (dwStandardMask & SPEAKER_FRONT_CENTER)  bXmaMask |= XMA_SPEAKER_CENTER;
    if (dwStandardMask & SPEAKER_LOW_FREQUENCY) bXmaMask |= XMA_SPEAKER_LFE;
    if (dwStandardMask & SPEAKER_SIDE_LEFT)     bXmaMask |= XMA_SPEAKER_LEFT_SURROUND;
    if (dwStandardMask & SPEAKER_SIDE_RIGHT)    bXmaMask |= XMA_SPEAKER_RIGHT_SURROUND;
    if (dwStandardMask & SPEAKER_BACK_LEFT)     bXmaMask |= XMA_SPEAKER_LEFT_BACK;
    if (dwStandardMask & SPEAKER_BACK_RIGHT)    bXmaMask |= XMA_SPEAKER_RIGHT_BACK;

    return bXmaMask;
}
```

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

[GetStandardChannelMaskFromXmaMask](/reference/audio/xma2defs/functions/getstandardchannelmaskfromxmamask)\
[xma2defs](/reference/audio/xma2defs/xma2defs_members)


## Related topics

- [GetStandardChannelMaskFromXmaMask](/reference/audio/xma2defs/functions/getstandardchannelmaskfromxmamask.md)
- [XMA2Defs](/reference/audio/xma2defs/xma2defs_members.md)
- [XMA2STREAMFORMAT](/reference/audio/xma2defs/structs/xma2streamformat.md)
- [XMA2 encoder tool](/build/console-features/audio/tools/xma2encodertool.md)
- [XMASTREAMFORMAT](/reference/audio/xma2defs/structs/xmastreamformat.md)
