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

# XApuCommandId

> XApuCommandId

# XApuCommandId

Defines the base command parameters to be sent and received from XAPU. All other commands are expanded from this type.

## Syntax

```cpp theme={null}
typedef struct XApuCommandId {  
    XApuCommandType type;  
    uint32_t streamIndex;  
    uint32_t sequence;  
    XApuCommandOptions options;  
    void* context;  
} XApuCommandId  
```

### Members

*type*\
Type: [XApuCommandType](/reference/audio/xapu/enums/xapucommandtype)

Command type to instruct the hardware how to process the associated data in this command.

*streamIndex*\
Type: uint32\_t

Index of the stream. The value should be between 0 and [XApuConnectInputParameters::maxStreamCount](/reference/audio/xapu/structs/xapuconnectinputparameters) - 1. Every stream should have a unique index value and the caller is responsible for assigning this value.

*sequence*\
Type: uint32\_t

This value is untouched by XAPU and it up to the caller how to use it. It can be used as a command sequence number that shall increase with time to track packets as they come out from the result queue. XAPU will not rearrange the packets' order according to this sequence number, nor will it return an error if this number goes backwards or if there is a gap from a previous value.

*options*\
Type: [XApuCommandOptions](/reference/audio/xapu/enums/xapucommandoptions)

Command options. Some options can be applied to all command types like [XApuCommandOptions::SignalOnCompletion](/reference/audio/xapu/enums/xapucommandoptions), others work for a specific command type like [XApuCommandOptions::Flush](/reference/audio/xapu/enums/xapucommandoptions) and [XApuCommandOptions::Decoder](/reference/audio/xapu/enums/xapucommandoptions).

*context*\
Type: void\*

An optional place holder for user data that XAPU will pass around internally, as is, from the enqueue command stage all the way to the dequeue result stage. The caller is free to pass any data that will fit within the 64-bit unsigned value such as timestamps.

## Remarks

Used by [XApuCommandId](/reference/audio/xapu/structs/xapucommandid) to define the base command parameters sent and received from the XAPU. All other commands are expanded from this type. For more information about decode and convert activate processing parameters, see [XApuDecodeConvertActivateCommand](/reference/audio/xapu/structs/xapudecodeconvertactivatecommand) and [XApuDecodeConvertCommand](/reference/audio/xapu/structs/xapudecodeconvertcommand). For information about submitting a command to the XAPU input queue, see [XApuEnqueueCommand](/reference/audio/xapu/functions/xapuenqueuecommand).

## Requirements

**Header:** xapu.h

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

## See also

[XApuDequeueResult](/reference/audio/xapu/functions/xapudequeueresult)\
[XApuResult](/reference/audio/xapu/structs/xapuresult)\
[XAPU](/reference/audio/xapu/xapu_members)


## Related topics

- [XApuDecodeConvertActivateCommand](/reference/audio/xapu/structs/xapudecodeconvertactivatecommand.md)
- [XApuCommandType](/reference/audio/xapu/enums/xapucommandtype.md)
- [XApuCommandOptions](/reference/audio/xapu/enums/xapucommandoptions.md)
- [XApuEnqueueCommand](/reference/audio/xapu/functions/xapuenqueuecommand.md)
- [XApuDecodeConvertCommand](/reference/audio/xapu/structs/xapudecodeconvertcommand.md)
