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

# ACP_COMMAND_ENABLE_OR_DISABLE_XMA_CONTEXTS

> ACP_COMMAND_ENABLE_OR_DISABLE_XMA_CONTEXTS

# ACP\_COMMAND\_ENABLE\_OR\_DISABLE\_XMA\_CONTEXTS

Command for enabling or disabling a series of XMA contexts.

## Syntax

```cpp theme={null}
typedef struct ACP_COMMAND_ENABLE_OR_DISABLE_XMA_CONTEXTS {  
    UINT32 context[SHAPE_NUM_XMA_CONTEXT_BITFIELDS];  
} ACP_COMMAND_ENABLE_OR_DISABLE_XMA_CONTEXTS  
```

### Members

*context*\
Type: UINT32\[SHAPE\_NUM\_XMA\_CONTEXT\_BITFIELDS]

Bitfield of contexts, where the array element = context / 32, and the mask = 1 \<\< (context % 32).

## Remarks

If the command `ACP_COMMAND_TYPE_DISABLE_XMA_CONTEXTS` is issued, the `ACP_MESSAGE_TYPE_COMMAND_COMPLETED` message is sent after all the XMA contexts are disabled and the decoder is no longer processing any of the contexts. This means that when the *command completed* message is received, a title is free to modify the context structures.

The reason the *command completed* message is sent after the context is disabled by the decoder, not simply after it's marked as disabled, is that the XMA decoder could be in the middle of an operation on the context, which can't be interrupted. This behavior is the same as that on the XBOX 360.

If the entire context array is initialized to zero, use the following to set the bit for each context index:

`context[contextIndex >> SHAPE_XMA_CONTEXT_INDEX_SHIFT] |= 1 << (contextIndex & SHAPE_XMA_CONTEXT_BIT_MASK);`

## Requirements

**Header:** acphal.h

**Supported platforms:** XBOX One family consoles and XBOX Series consoles

## See also

[ACP\_COMMAND\_TYPE](/reference/audio/acphal/enums/acp_command_type.md)\
[SubmitCommand](/reference/audio/acphal/interfaces/IAcpHal/methods/iacphal_submitcommand.md)\
[AcpHal](/reference/audio/acphal/acphal_members.md)


## Related topics

- [ACP_COMMAND_ENABLE_OR_DISABLE_XMA_CONTEXT](/reference/audio/acphal/structs/acp_command_enable_or_disable_xma_context.md)
- [ACP_COMMAND_TYPE](/reference/audio/acphal/enums/acp_command_type.md)
- [AcpHal](/reference/audio/acphal/acphal_members.md)
- [ACP_COMMAND_UPDATE_XMA_CONTEXT](/reference/audio/acphal/structs/acp_command_update_xma_context.md)
- [ACP_COMMAND_UPDATE_XMA_CONTEXT_ENTRY](/reference/audio/acphal/structs/acp_command_update_xma_context_entry.md)
