> ## 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](/zh-TW/reference/audio/shapesrccontext/structs/shape_src_context)\*

指向 [SHAPE\_SRC\_CONTEXT](/zh-TW/reference/audio/shapesrccontext/structs/shape_src_context) 物件的指標。

*command*   \
類型：[SHAPE\_SRC\_COMMAND\_TYPE](/zh-TW/reference/audio/shapesrccontext/enums/shape_src_command_type)

[SHAPE\_SRC\_COMMAND\_TYPE](/zh-TW/reference/audio/shapesrccontext/enums/shape_src_command_type) 列舉的成員。

### 傳回值

類型：HRESULT

HRESULT 成功或錯誤碼。

## 備註

三個 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](/zh-TW/reference/audio/shapesrccontext/enums/shape_src_command_type)。

若要取得目前的 SRC 命令，請使用 [GetShapeSrcCommandType](/zh-TW/reference/audio/shapesrccontext/functions/getshapesrccommandtype)。

SRC 命令可能會回報為遭到封鎖。如需詳細資訊，請參閱 [SHAPE 概觀](/zh-TW/build/console-features/audio/overviews/shape-overview)的[遭封鎖的命令](/zh-TW/build/console-features/audio/overviews/shape-overview#ID4EBGAC)一節。

## 需求

**標頭：** shapesrccontext.h

**支援的平台：** XBOX One 系列主機和 XBOX Series 主機

## 另請參閱

[ShapeSrcContext](/zh-TW/reference/audio/shapesrccontext/shapesrccontext_members)


## Related topics

- [SetShapeSrcCommand](/reference/audio/shapesrccontext/functions/shapesrccontext_setshapesrccommand.md)
- [SetShapeSrcCommand function](/reference/audio/shapeflowgraph/functions/shapeflowgraph_setshapesrccommand.md)
- [SetShapeSrcCommand 函数](/zh-CN/reference/audio/shapeflowgraph/functions/shapeflowgraph_setshapesrccommand.md)
- [Función SetShapeSrcCommand](/es/reference/audio/shapeflowgraph/functions/shapeflowgraph_setshapesrccommand.md)
