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

# SetShapeSrcCommand

> SetShapeSrcCommand

# SetShapeSrcCommand

サンプルレートコンバーター (SRC) コマンドを設定します。

## 構文

```cpp theme={null}
HRESULT SetShapeSrcCommand(  
         SHAPE_SRC_CONTEXT* context,  
         SHAPE_SRC_COMMAND_TYPE command  
)  
```

### パラメーター

*context*   \_Inout\_\
型: [SHAPE\_SRC\_CONTEXT](/reference/audio/shapesrccontext/structs/shape_src_context)\*

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

*command*   \
型: [SHAPE\_SRC\_COMMAND\_TYPE](/reference/audio/shapesrccontext/enums/shape_src_command_type)

[SHAPE\_SRC\_COMMAND\_TYPE](/reference/audio/shapesrccontext/enums/shape_src_command_type) 列挙型のメンバー。

### 戻り値

型: HRESULT

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

## 解説

3 種類の SRC コマンドは次のとおりです。

| コマンド                                    | 動作                                                                   |
| --------------------------------------- | -------------------------------------------------------------------- |
| `SHAPE_SRC_COMMAND_TYPE_START`          | 通常の処理を実行し、現在のフローグラフに続く追加のオーディオデータが提供されることを想定します。                     |
| `SHAPE_SRC_COMMAND_TYPE_STOP_IMMEDIATE` | ソースの XMA または PCM データの処理を直ちに停止します。SRC はこのフレームに対してゼロで埋められたバッファーを出力します。 |
| `SHAPE_SRC_COMMAND_TYPE_STOP_END`       | 現在のパケットの後で処理を停止します。                                                  |

詳細については、[SHAPE\_SRC\_COMMAND\_TYPE](/reference/audio/shapesrccontext/enums/shape_src_command_type) を参照してください。

現在の SRC コマンドを取得するには、[GetShapeSrcCommandType](/reference/audio/shapesrccontext/functions/getshapesrccommandtype) を使用します。

SRC コマンドはブロックとして報告されることがあります。詳細については、[SHAPE の概要](/build/console-features/audio/overviews/shape-overview) の [ブロックされたコマンド](/build/console-features/audio/overviews/shape-overview#ID4EBGAC) セクションを参照してください。

## 要件

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

**サポート対象プラットフォーム:** XBOX One ファミリー本体および XBOX Series 本体

## 関連項目

[ShapeSrcContext](/reference/audio/shapesrccontext/shapesrccontext_members)


## Related topics

- [SetShapeSrcCommand function](/ja-jp/reference/audio/shapeflowgraph/functions/shapeflowgraph_setshapesrccommand.md)
- [SHAPE_SRC_COMMAND_TYPE](/ja-jp/reference/audio/shapesrccontext/enums/shape_src_command_type.md)
- [ShapeFlowGraph](/ja-jp/reference/audio/shapeflowgraph/shapeflowgraph_members.md)
- [GetShapeSrcCommandType](/ja-jp/reference/audio/shapesrccontext/functions/getshapesrccommandtype.md)
- [ShapeSrcContext](/ja-jp/reference/audio/shapesrccontext/shapesrccontext_members.md)
