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

チャンネル数を設定します。

## 構文

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

### パラメーター

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

[SHAPE\_XMA\_CONTEXT](https://docs.xbox.com/ja-jp/reference/audio/shapexmacontext/structs/shape_xma_context.md) オブジェクトへのポインター。

*numChannels*   \
型: UINT32

チャンネル数。1 (モノラル) または 2 (ステレオ) のいずれか。

### 戻り値

型: HRESULT

HRESULT の成功またはエラー コード。

## 解説

この関数は、コンテキスト内の実際のチャンネル数を設定します。([SHAPE\_XMA\_CONTEXT](https://docs.xbox.com/ja-jp/reference/audio/shapexmacontext/structs/shape_xma_context.md) オブジェクトでは、`numChannels` メンバーには 0 \[モノラル] または 1 \[ステレオ] の値が含まれます。)

現在のチャンネル数を取得するには、[GetShapeXmaNumChannels](https://docs.xbox.com/ja-jp/reference/audio/shapexmacontext/functions/getshapexmanumchannels.md) を使用します。

詳細については、[SHAPE の概要](https://docs.xbox.com/ja-jp/build/console-features/audio/overviews/shape-overview.md) の [XMA](https://docs.xbox.com/ja-jp/build/console-features/audio/overviews/shape-overview.md#ID4EYD) セクションを参照してください。

## 要件

**ヘッダー:** shapexmacontext.h

**サポートされているプラットフォーム:** XBOX One ファミリ本体および XBOX Series 本体

## 関連項目

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


## Related topics

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