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

# SetShapeXmaSampleRate(SHAPE_XMA_CONTEXT*, SHAPE_XMA_SAMPLE_RATE)

> SetShapeXmaSampleRate(SHAPE_XMA_CONTEXT*, SHAPE_XMA_SAMPLE_RATE)

# SetShapeXmaSampleRate(SHAPE\_XMA\_CONTEXT\*, SHAPE\_XMA\_SAMPLE\_RATE)

サンプル レートを設定します。

<a id="syntaxSection" />

## 構文

```cpp theme={null}
HRESULT SetShapeXmaSampleRate(  
         SHAPE_XMA_CONTEXT* context,  
         SHAPE_XMA_SAMPLE_RATE sampleRate  
)  
```

<a id="parametersSection" />

### パラメーター

*context*   \_Inout\_\
型: [SHAPE\_XMA\_CONTEXT](/reference/audio/shapexmacontext/structs/shape_xma_context)\*

[SHAPE\_XMA\_CONTEXT](/reference/audio/shapexmacontext/structs/shape_xma_context) オブジェクトへのポインター。

*sampleRate*   \
型: [SHAPE\_XMA\_SAMPLE\_RATE](/reference/audio/shapexmacontext/enums/shape_xma_sample_rate)

[SHAPE\_XMA\_SAMPLE\_RATE](/reference/audio/shapexmacontext/enums/shape_xma_sample_rate) 列挙型のメンバー。

<a id="retvalSection" />

### 戻り値

型: HRESULT

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

<a id="remarksSection" />

## 解説

整数を指定してサンプル レートを設定するには、[SetShapeXmaSampleRate(SHAPE\_XMA\_CONTEXT\*, UINT32)](/reference/audio/shapexmacontext/functions/setshapexmasamplerate_2) を使用します。

現在のサンプル レートを取得するには、[GetShapeXmaSampleRate](/reference/audio/shapexmacontext/functions/getshapexmasamplerate) を使用します。

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

<a id="requirementsSection" />

## 要件

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

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

<a id="seealsoSection" />

## 関連項目

[ShapeXmaContext](/reference/audio/shapexmacontext/shapexmacontext_members)


## Related topics

- [SHAPE_XMA_SAMPLE_RATE](/ja-jp/reference/audio/shapexmacontext/enums/shape_xma_sample_rate.md)
- [GetShapeXmaSampleRate](/ja-jp/reference/audio/shapexmacontext/functions/getshapexmasamplerate.md)
- [ShapeXmaContext](/ja-jp/reference/audio/shapexmacontext/shapexmacontext_members.md)
- [SHAPE_XMA_CONTEXT](/ja-jp/reference/audio/shapexmacontext/structs/shape_xma_context.md)
- [GetXmaSampleRate](/ja-jp/reference/audio/xma2defs/functions/getxmasamplerate.md)
