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

# GetStandardChannelMaskFromXmaMask

> GetStandardChannelMaskFromXmaMask

# GetStandardChannelMaskFromXmaMask

Converts between `WAVEFORMATEXTENSIBLE` channel masks that are combinations of `SPEAKER_xxx` flags defined in the *audiodef.h* file and the XBOX Media Audio (XMA) channel masks.

## Syntax

```cpp theme={null}
DWORD GetStandardChannelMaskFromXmaMask(  
         BYTE bXmaMask  
)  
```

### Parameters

*bXmaMask*   \
Type: BYTE

Input byte mask.

### Return value

Type: DWORD

Standard mask.

## Remarks

This function converts `WAVEFORMATEXTENSIBLE` channel masks that are combinations of `SPEAKER_xxx` flags defined in the *audiodef.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 DWORD GetStandardChannelMaskFromXmaMask(BYTE bXmaMask)
{
    DWORD dwStandardMask = 0;

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

    return dwStandardMask;
}
```

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

[GetXmaChannelMaskFromStandardMask](/reference/audio/xma2defs/functions/getxmachannelmaskfromstandardmask)\
[xma2defs](/reference/audio/xma2defs/xma2defs_members)


## Related topics

- [GetXmaChannelMaskFromStandardMask](/reference/audio/xma2defs/functions/getxmachannelmaskfromstandardmask.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)
