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

> ACP_COMMAND_UPDATE_EQCOMP_CONTEXT_ENTRY

# ACP\_COMMAND\_UPDATE\_EQCOMP\_CONTEXT\_ENTRY

Entry for updating `SHAPE_EQCOMP_CONTEXT`.

## Syntax

```cpp theme={null}
typedef struct ACP_COMMAND_UPDATE_EQCOMP_CONTEXT_ENTRY {  
    UINT32 contextIndex;  
    UINT32 eqAB0Target : 24;  
    UINT32 eqAB1Target_L : 8;  
    UINT32 eqAB1Target_H : 16;  
    UINT32 eqAB2Target_L : 16;  
    UINT32 eqAB2Target_H : 8;  
    UINT32 eqAA1Target : 24;  
    UINT32 eqAA2Target : 24;  
    UINT32 eqBB0Target_L : 8;  
    UINT32 eqBB0Target_H : 16;  
    UINT32 eqBB1Target_L : 16;  
    UINT32 eqBB1Target_H : 8;  
    UINT32 eqBB2Target : 24;  
    UINT32 eqBA1Target : 24;  
    UINT32 eqBA2Target_L : 8;  
    UINT32 eqBA2Target_H : 16;  
    UINT32 eqCB0Target_L : 16;  
    UINT32 eqCB0Target_H : 8;  
    UINT32 eqCB1Target : 24;  
    UINT32 eqCB2Target : 24;  
    UINT32 eqCA1Target_L : 8;  
    UINT32 eqCA1Target_H : 16;  
    UINT32 eqCA2Target_L : 16;  
    UINT32 eqCA2Target_H : 8;  
    UINT32 reserved : 24;  
    UINT32 compGainTarget;  
} ACP_COMMAND_UPDATE_EQCOMP_CONTEXT_ENTRY  
```

### Members

*contextIndex*\
Type: UINT32

Index in the range of 0 to `ACP_MAX_NUM_EQCOMP_CONTEXTS`.

*eqAB0Target*\
Type: UINT32

Replaces the existing value of `SHAPE_EQCOMP_CONTEXT::eqAB0Target`.

*eqAB1Target\_L*\
Type: UINT32

Replaces the existing value of `SHAPE_EQCOMP_CONTEXT::eqAB1Target_L`.

*eqAB1Target\_H*\
Type: UINT32

Replaces the existing value of `SHAPE_EQCOMP_CONTEXT::eqAB1Target_H`.

*eqAB2Target\_L*\
Type: UINT32

Replaces the existing value of `SHAPE_EQCOMP_CONTEXT::eqAB2Target_L`.

*eqAB2Target\_H*\
Type: UINT32

Replaces the existing value of `SHAPE_EQCOMP_CONTEXT::eqAB2Target_H`.

*eqAA1Target*\
Type: UINT32

Replaces the existing value of `SHAPE_EQCOMP_CONTEXT::eqAA1Target`.

*eqAA2Target*\
Type: UINT32

Replaces the existing value of `SHAPE_EQCOMP_CONTEXT::eqAA2Target`.

*eqBB0Target\_L*\
Type: UINT32

Replaces the existing value of `SHAPE_EQCOMP_CONTEXT::eqBB0Target_L`.

*eqBB0Target\_H*\
Type: UINT32

Replaces the existing value of `SHAPE_EQCOMP_CONTEXT::eqBB0Target_H`.

*eqBB1Target\_L*\
Type: UINT32

Replaces the existing value of `SHAPE_EQCOMP_CONTEXT::eqBB1Target_L`.

*eqBB1Target\_H*\
Type: UINT32

Replaces the existing value of `SHAPE_EQCOMP_CONTEXT::eqBB1Target_H`.

*eqBB2Target*\
Type: UINT32

Replaces the existing value of `SHAPE_EQCOMP_CONTEXT::eqBB2Target`.

*eqBA1Target*\
Type: UINT32

Replaces the existing value of `SHAPE_EQCOMP_CONTEXT::eqBA1Target`.

*eqBA2Target\_L*\
Type: UINT32

Replaces the existing value of `SHAPE_EQCOMP_CONTEXT::eqBA2Target_L`.

*eqBA2Target\_H*\
Type: UINT32

Replaces the existing value of `SHAPE_EQCOMP_CONTEXT::eqBA2Target_H`.

*eqCB0Target\_L*\
Type: UINT32

Replaces the existing value of `SHAPE_EQCOMP_CONTEXT::eqCB0Target_L`.

*eqCB0Target\_H*\
Type: UINT32

Replaces the existing value of `SHAPE_EQCOMP_CONTEXT::eqCB0Target_H`.

*eqCB1Target*\
Type: UINT32

Replaces the existing value of `SHAPE_EQCOMP_CONTEXT::eqCB1Target`.

*eqCB2Target*\
Type: UINT32

Replaces the existing value of `SHAPE_EQCOMP_CONTEXT::eqCB2Target`.

*eqCA1Target\_L*\
Type: UINT32

Replaces the existing value of `SHAPE_EQCOMP_CONTEXT::eqCA1Target_L`.

*eqCA1Target\_H*\
Type: UINT32

Replaces the existing value of `SHAPE_EQCOMP_CONTEXT::eqCA1Target_H`.

*eqCA2Target\_L*\
Type: UINT32

Replaces the existing value of `SHAPE_EQCOMP_CONTEXT::eqCA2Target_L`.

*eqCA2Target\_H*\
Type: UINT32

Replaces the existing value of `SHAPE_EQCOMP_CONTEXT::eqCA2Target_H`.

*Reserved*\
Type: UINT32

Reserved

*compGainTarget*\
Type: UINT32

Replaces the existing value of `SHAPE_EQCOMP_CONTEXT::compGainTarget`.

## Remarks

This structure is used by the `ACP_COMMAND_UPDATE_CONTEXTS` and `ACP_COMMAND_UPDATE_ALL_CONTEXTS` commands to update a single EQ/Comp context. Use the command to update only a small number of contexts per audio frame; updating a large number of contexts is not efficient. See the [Rendering audio section of Overview of ACP](/build/console-features/audio/overviews/acp-overview#ID4E6C) for more detail.

This structure also includes inline methods:

```cpp theme={null}
inline void SetRawFilterATargetCoefficients(INT32 a1, INT32 a2, INT32 b0, INT32 b1, INT32 b2)
{
    eqAA1Target   = ShapeSignedToU24(a1);
    eqAA2Target   = ShapeSignedToU24(a2);
    eqAB0Target   = ShapeSignedToU24(b0);
    eqAB1Target_L = ShapeSignedToLowU8(b1);
    eqAB1Target_H = ShapeSignedToHighU16(b1);
    eqAB2Target_L = ShapeSignedToLowU16(b2);
    eqAB2Target_H = ShapeSignedToHighU8(b2);
}

inline void SetRawFilterBTargetCoefficients(INT32 a1, INT32 a2, INT32 b0, INT32 b1, INT32 b2)
{
    eqBA1Target   = ShapeSignedToU24(a1);
    eqBA2Target_L = ShapeSignedToLowU8(a2);
    eqBA2Target_H = ShapeSignedToHighU16(a2);
    eqBB0Target_L = ShapeSignedToLowU8(b0);
    eqBB0Target_H = ShapeSignedToHighU16(b0);
    eqBB1Target_L = ShapeSignedToLowU16(b1);
    eqBB1Target_H = ShapeSignedToHighU8(b1);
    eqBB2Target   = ShapeSignedToU24(b2);
}

inline void SetRawFilterCTargetCoefficients(INT32 a1, INT32 a2, INT32 b0, INT32 b1, INT32 b2)
{
    eqCA1Target_L = ShapeSignedToLowU8(a1);
    eqCA1Target_H = ShapeSignedToHighU16(a1);
    eqCA2Target_L = ShapeSignedToLowU16(a2);
    eqCA2Target_H = ShapeSignedToHighU8(a2);
    eqCB0Target_L = ShapeSignedToLowU16(b0);
    eqCB0Target_H = ShapeSignedToHighU8(b0);
    eqCB1Target   = ShapeSignedToU24(b1);
    eqCB2Target   = ShapeSignedToU24(b2);
};

inline void SetGainTarget(float gainTarget) // Gain target (amplitude, not dB)
{
    compGainTarget = ShapeUnsignedToU16((UINT32)(gainTarget * SHAPE_Q13));
}  
```

## 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)\
[SubmitCommand](/reference/audio/acphal/interfaces/IAcpHal/methods/iacphal_submitcommand)\
[AcpHal](/reference/audio/acphal/acphal_members)


## Related topics

- [AcpHal](/reference/audio/acphal/acphal_members.md)
- [ACP_COMMAND_UPDATE_CONTEXTS](/reference/audio/acphal/structs/acp_command_update_contexts.md)
- [ACP_COMMAND_UPDATE_ALL_CONTEXTS](/reference/audio/acphal/structs/acp_command_update_all_contexts.md)
- [ACP_COMMAND_UPDATE_EQCOMP_CONTEXT](/reference/audio/acphal/structs/acp_command_update_eqcomp_context.md)
- [ACP_COMMAND_UPDATE_XMA_CONTEXT_ENTRY](/reference/audio/acphal/structs/acp_command_update_xma_context_entry.md)
