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

# SetShapeSrcCommand

> SetShapeSrcCommand

# SetShapeSrcCommand

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

## 構文

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

### パラメーター

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

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

*command*   \
型: [SHAPE\_SRC\_COMMAND\_TYPE](https://docs.xbox.com/ja-jp/reference/audio/shapesrccontext/enums/shape_src_command_type.md)

[SHAPE\_SRC\_COMMAND\_TYPE](https://docs.xbox.com/ja-jp/reference/audio/shapesrccontext/enums/shape_src_command_type.md) 列挙型のメンバー。

### 戻り値

型: 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](https://docs.xbox.com/ja-jp/reference/audio/shapesrccontext/enums/shape_src_command_type.md) を参照してください。

現在の SRC コマンドを取得するには、[GetShapeSrcCommandType](https://docs.xbox.com/ja-jp/reference/audio/shapesrccontext/functions/getshapesrccommandtype.md) を使用します。

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

## 要件

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

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

## 関連項目

[ShapeSrcContext](https://docs.xbox.com/ja-jp/reference/audio/shapesrccontext/shapesrccontext_members.md)


## Related topics

- [SetShapeSrcCommand 関数](https://docs.xbox.com/ja-jp/reference/audio/shapeflowgraph/functions/shapeflowgraph_setshapesrccommand.md)
- [SHAPE_SRC_COMMAND_TYPE](https://docs.xbox.com/ja-jp/reference/audio/shapesrccontext/enums/shape_src_command_type.md)
- [ShapeFlowGraph](https://docs.xbox.com/ja-jp/reference/audio/shapeflowgraph/shapeflowgraph_members.md)
- [GetShapeSrcCommandType](https://docs.xbox.com/ja-jp/reference/audio/shapesrccontext/functions/getshapesrccommandtype.md)
- [ShapeSrcContext](https://docs.xbox.com/ja-jp/reference/audio/shapesrccontext/shapesrccontext_members.md)
