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

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](/pt-BR/build/console-features/audio/overviews/xma2-overview). 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](/pt-BR/build/console-features/audio/overviews/xbox-one-audio-architecture).

## Requisitos

**Cabeçalho:** xma2defs.h

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

## Confira também

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


## Related topics

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