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

# GetShapeSrcCommandType

> GetShapeSrcCommandType

# GetShapeSrcCommandType

获取当前 SRC 命令。

## 语法

```cpp theme={null}
SHAPE_SRC_COMMAND_TYPE GetShapeSrcCommandType(  
         const SHAPE_SRC_CONTEXT* context  
)  
```

### 参数

*context*   \_In\_\
类型：[SHAPE\_SRC\_CONTEXT](/reference/audio/shapesrccontext/structs/shape_src_context)\*

指向 [SHAPE\_SRC\_CONTEXT](/reference/audio/shapesrccontext/structs/shape_src_context) 对象的指针。

### 返回值

类型：SHAPE\_SRC\_COMMAND\_TYPE

[SHAPE\_SRC\_COMMAND\_TYPE](/reference/audio/shapesrccontext/enums/shape_src_command_type) 枚举的成员。

## 备注

三种 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 命令，请使用 [SetShapeSrcCommand](/reference/audio/shapesrccontext/functions/shapesrccontext_setshapesrccommand)。

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

- [SHAPE_SRC_COMMAND_TYPE](/zh-CN/reference/audio/shapesrccontext/enums/shape_src_command_type.md)
- [SetShapeSrcCommand](/zh-CN/reference/audio/shapesrccontext/functions/shapesrccontext_setshapesrccommand.md)
- [ShapeSrcContext](/zh-CN/reference/audio/shapesrccontext/shapesrccontext_members.md)
- [SHAPE_FLOWGRAPH_SRC_COMMAND](/zh-CN/reference/audio/shapeflowgraph/structs/shape_flowgraph_src_command.md)
- [GetShapePcmFormat](/zh-CN/reference/audio/shapepcmcontext/functions/getshapepcmformat.md)
