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

# XApuCommandType

> XApuCommandType

# XApuCommandType

定义将在单个流上执行的命令类型。

## Syntax

```cpp theme={null}
enum class XApuCommandType  : uint32_t  
{  
    None = 0,  
    Activate = 1,  
    Deactivate = 2,  
    Process = 3,  
    Notify = 4,  
    Reset = 5,  
}  
```

## Constants

| 常量 | 说明 |
| - | - |
| None | 无效的命令类型。 |
| Activate | 激活并初始化单个流以进行处理。 |
| Deactivate | 停用并释放单个流的资源。 |
| Process | 处理单个流的输入数据以生成输出。 |
| Notify | 未使用。 |
| Reset | 将单个流的解码和/或转换引擎重置为其最初的激活状态。此命令通过使用与最初激活时相同的参数(如 channelCount 和 startPitch)将解码器和转换器置于其最初的激活状态。是否在查找、循环或拼接两个流时使用 [XApuCommandType::Reset](https://docs.xbox.com/zh-CN/reference/audio/xapu/enums/xapucommandtype.md) 由调用方决定,但在使用时,调用方必须提交预滚数据以避免输出中的瞬态效应。 |

## Remarks

此枚举确定激活和停用进程(如解码、转换和解码转换)。它在停用期间释放进程资源。它发送有关当前活动处理器状态的通知。它也可以将进程重置为其最初的激活状态。

## Requirements

**头文件:** xapu.h

**支持的平台:** XBOX Series X|S

## See also

[XAPU](https://docs.xbox.com/zh-CN/reference/audio/xapu/xapu_members.md)\
[XApuCommandId](https://docs.xbox.com/zh-CN/reference/audio/xapu/structs/xapucommandid.md)\
[XApuDequeueResult](https://docs.xbox.com/zh-CN/reference/audio/xapu/functions/xapudequeueresult.md)\
[XApuEnqueueCommand](https://docs.xbox.com/zh-CN/reference/audio/xapu/functions/xapuenqueuecommand.md)


## Related topics

- [XApuEnqueueCommand](https://docs.xbox.com/zh-CN/reference/audio/xapu/functions/xapuenqueuecommand.md)
- [XApuUtilization](https://docs.xbox.com/zh-CN/reference/audio/xapu/structs/xapuutilization.md)
- [XApuCommandOptions](https://docs.xbox.com/zh-CN/reference/audio/xapu/enums/xapucommandoptions.md)
- [XApuCommandId](https://docs.xbox.com/zh-CN/reference/audio/xapu/structs/xapucommandid.md)
- [XApuDisconnect](https://docs.xbox.com/zh-CN/reference/audio/xapu/functions/xapudisconnect.md)
