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

# XApuCommandOptions

> XApuCommandOptions

# XApuCommandOptions

Define options for different command types.

## Syntax

```cpp theme={null}
enum class XApuCommandOptions  : uint32_t  
{  
    None = 0,  
    SignalOnCompletion = 1,  
    Flush = 2,  
    Decoder = 4,  
}  
```

## Constants

| Constant           | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| None               | No options are set.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| SignalOnCompletion | This flag can be applied to all command types and when set, [XApuConnectOutputParameters::resultReadyEvent](/reference/audio/xapu/structs/xapuconnectoutputparameters) is signaled when the result of the command is ready. To use this flag, the caller must set [XApuConnectOptions::EnableResultReadyEvent](/reference/audio/xapu/enums/xapuconnectoptions) in [XApuConnect](/reference/audio/xapu/functions/xapuconnect). Please refer to the [XApuConnectOutputParameters::resultReadyEvent](/reference/audio/xapu/structs/xapuconnectoutputparameters) description.                                                                                                                                             |
| Flush              | Release output data if available without waiting for more input data. This flag works with [XApuProcessType::Process](/reference/audio/xapu/enums/xapuprocesstype) only, otherwise it will be ignored. This flag can be used with [XApuProcessType::DecodeConvertOpus](/reference/audio/xapu/enums/xapuprocesstype) and [XApuProcessType::ConvertPCM](/reference/audio/xapu/enums/xapuprocesstype) only.                                                                                                                                                                                                                                                                                                              |
| Decoder            | When set it will reset the decoder in [XApuProcessType::DecodeConvertOpus](/reference/audio/xapu/enums/xapuprocesstype) processing mode only. This flag works with [XApuCommandType::Reset](/reference/audio/xapu/enums/xapucommandtype) only, otherwise it will be ignored. This flag can be used to reset the decoder only in a decode-convert case during seeking. It is up to the caller to use [XApuCommandType::Reset](/reference/audio/xapu/enums/xapucommandtype) with the [XApuCommandOptions::Decoder](/reference/audio/xapu/enums/xapucommandoptions) flag during seeking, looping or splicing two streams, but when used the caller must submit preroll data to avoid the transient effect in the output. |

## Remarks

This enumeration uses the [XApuConnectOutputParameters::resultReadyEvent](/reference/audio/xapu/structs/xapuconnectoutputparameters) method to signal when the result of the command is ready. The decoder command uses the [XApuProcessType::DecodeConvertOpus](/reference/audio/xapu/enums/xapuprocesstype) method only. Otherwise, the Opus decoder will be reset using the [XApuCommandType::Reset](/reference/audio/xapu/enums/xapucommandtype) method.

When the Decoder flag is used with the Reset command, it will not erase the data that has already been decoded but is still waiting to be processed into the HSRC.

## Requirements

**Header:** xapu.h

**Supported platforms:** XBOX Series X|S

## See also

[XApuCommandId](/reference/audio/xapu/structs/xapucommandid)\
[XApuConnectOutputParameters](/reference/audio/xapu/structs/xapuconnectoutputparameters)\
[XAPU](/reference/audio/xapu/xapu_members)


## Related topics

- [XApuCommandId](/reference/audio/xapu/structs/xapucommandid.md)
- [XApuConnectOutputParameters](/reference/audio/xapu/structs/xapuconnectoutputparameters.md)
- [XAPU](/reference/audio/xapu/xapu_members.md)
- [XApuDecodeConvertActivateCommand](/reference/audio/xapu/structs/xapudecodeconvertactivatecommand.md)
- [XAPU overview](/build/console-features/audio/overviews/xapu-overview.md)
