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

# GetXmaChannelMaskFromStandardMask

> GetXmaChannelMaskFromStandardMask

# GetXmaChannelMaskFromStandardMask

Converte entre máscaras de canal `WAVEFORMATEXTENSIBLE`, que são combinações de sinalizadores `SPEAKER_xxx` definidos no arquivo *audiodef.h*, e máscaras de canal XBOX Media Audio (XMA), que são limitadas a oito posições de alto-falante possíveis.

## Sintaxe

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

### Parâmetros

*dwStandardMask*   \
Tipo: DWORD

Máscara padrão.

### Valor retornado

Tipo: BYTE

Máscara de bytes.

## Comentários

Essa função converte entre máscaras de canal `WAVEFORMATEXTENSIBLE`, que são combinações de sinalizadores `SPEAKER_xxx` definidos no arquivo *audiodefs.h*, e máscaras de canal XMA, que são limitadas a oito posições de alto-falante possíveis.

Conforme mostrado no exemplo de código abaixo, essas posições de alto-falante incluem esquerdo, direito, central, baixa frequência, lateral esquerdo, lateral direito, traseiro esquerdo e traseiro direito.

```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;
}
```

Para obter mais informações sobre o XMA2, consulte [Visão geral do XMA2](https://docs.xbox.com/pt-BR/build/console-features/audio/overviews/xma2-overview.md). Para obter uma visão geral da arquitetura de áudio do XBOX One, consulte **O som do futuro**: [A arquitetura de áudio no XBOX One](https://docs.xbox.com/pt-BR/build/console-features/audio/overviews/xbox-one-audio-architecture.md).

## Requisitos

**Cabeçalho:** xma2defs.h

**Plataformas com suporte:** consoles da família XBOX One e consoles XBOX Series

## Confira também

[GetStandardChannelMaskFromXmaMask](https://docs.xbox.com/pt-BR/reference/audio/xma2defs/functions/getstandardchannelmaskfromxmamask.md)\
[xma2defs](https://docs.xbox.com/pt-BR/reference/audio/xma2defs/xma2defs_members.md)


## Related topics

- [GetStandardChannelMaskFromXmaMask](https://docs.xbox.com/pt-BR/reference/audio/xma2defs/functions/getstandardchannelmaskfromxmamask.md)
- [XMA2Defs](https://docs.xbox.com/pt-BR/reference/audio/xma2defs/xma2defs_members.md)
- [XMA2STREAMFORMAT](https://docs.xbox.com/pt-BR/reference/audio/xma2defs/structs/xma2streamformat.md)
- [get_thread_affinity_mask](https://docs.xbox.com/pt-BR/reference/chat/gamechat2/classes/chat_manager/methods/chat_manager_get_thread_affinity_mask.md)
- [ACP_COMMAND_UPDATE_XMA_CONTEXT](https://docs.xbox.com/pt-BR/reference/audio/acphal/structs/acp_command_update_xma_context.md)
