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

# SetShapeXmaNumChannels

> SetShapeXmaNumChannels

# SetShapeXmaNumChannels

Définit le nombre de canaux.

## Syntaxe

```cpp theme={null}
HRESULT SetShapeXmaNumChannels(  
         SHAPE_XMA_CONTEXT* context,  
         UINT32 numChannels  
)  
```

### Paramètres

*context*   \_Inout\_\
Type : [SHAPE\_XMA\_CONTEXT](https://docs.xbox.com/fr-CA/reference/audio/shapexmacontext/structs/shape_xma_context.md)\*

Pointeur vers un objet [SHAPE\_XMA\_CONTEXT](https://docs.xbox.com/fr-CA/reference/audio/shapexmacontext/structs/shape_xma_context.md).

*numChannels*   \
Type : UINT32

Nombre de canaux : 1 (mono) ou 2 (stéréo).

### Valeur de retour

Type : HRESULT

Code de réussite ou d'erreur HRESULT.

## Remarques

Cette fonction définit le nombre réel de canaux dans le contexte. (Dans l'objet [SHAPE\_XMA\_CONTEXT](https://docs.xbox.com/fr-CA/reference/audio/shapexmacontext/structs/shape_xma_context.md), le membre `numChannels` contient les valeurs 0 \[mono] ou 1 \[stéréo].)

Pour obtenir le nombre actuel de canaux, utilisez [GetShapeXmaNumChannels](https://docs.xbox.com/fr-CA/reference/audio/shapexmacontext/functions/getshapexmanumchannels.md).

Pour plus d'informations, consultez la section [XMA](https://docs.xbox.com/fr-CA/build/console-features/audio/overviews/shape-overview.md#ID4EYD) de [Vue d'ensemble de SHAPE](https://docs.xbox.com/fr-CA/build/console-features/audio/overviews/shape-overview.md).

## Configuration requise

**En-tête :** shapexmacontext.h

**Plateformes prises en charge :** consoles de la famille XBOX One et consoles XBOX Series

## Voir aussi

[ShapeXmaContext](https://docs.xbox.com/fr-CA/reference/audio/shapexmacontext/shapexmacontext_members.md)


## Related topics

- [GetShapeXmaNumChannels](https://docs.xbox.com/fr-CA/reference/audio/shapexmacontext/functions/getshapexmanumchannels.md)
- [ShapeXmaContext](https://docs.xbox.com/fr-CA/reference/audio/shapexmacontext/shapexmacontext_members.md)
- [SetShapeDmaNumChannels](https://docs.xbox.com/fr-CA/reference/audio/shapedmacontext/functions/setshapedmanumchannels.md)
- [SetShapeXmaNumLoops](https://docs.xbox.com/fr-CA/reference/audio/shapexmacontext/functions/setshapexmanumloops.md)
- [SetShapeXmaNumSubframesToDecode](https://docs.xbox.com/fr-CA/reference/audio/shapexmacontext/functions/setshapexmanumsubframestodecode.md)
