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

# SHAPE_EQCOMP_CONTEXT

> SHAPE_EQCOMP_CONTEXT

# SHAPE\_EQCOMP\_CONTEXT

The equalizer and compressor (EQComp) context.

## Syntax

```cpp theme={null}
typedef struct SHAPE_EQCOMP_CONTEXT {  
    UINT32 timestamp : 21;  
    UINT32 reserved0 : 2;  
    UINT32 internalSaturate : 1;  
    UINT32 mixBufPeakMag : 4;  
    UINT32 peakMag : 4;  
    UINT32 eqAB0 : 24;  
    UINT32 eqAB1_L : 8;  
    UINT32 eqAB1_H : 16;  
    UINT32 eqAB2_L : 16;  
    UINT32 eqAB2_H : 8;  
    UINT32 eqAA1 : 24;  
    UINT32 eqAA2 : 24;  
    UINT32 eqBB0_L : 8;  
    UINT32 eqBB0_H : 16;  
    UINT32 eqBB1_L : 16;  
    UINT32 eqBB1_H : 8;  
    UINT32 eqBB2 : 24;  
    UINT32 eqBA1 : 24;  
    UINT32 eqBA2_L : 8;  
    UINT32 eqBA2_H : 16;  
    UINT32 eqCB0_L : 16;  
    UINT32 eqCB0_H : 8;  
    UINT32 eqCB1 : 24;  
    UINT32 eqCB2 : 24;  
    UINT32 eqCA1_L : 8;  
    UINT32 eqCA1_H : 16;  
    UINT32 eqCA2_L : 16;  
    UINT32 eqCA2_H : 8;  
    UINT32 reserved1 : 24;  
    UINT32 eqAInputDelay0 : 24;  
    UINT32 reserved2 : 8;  
    UINT32 eqAInputDelay1 : 24;  
    UINT32 reserved3 : 8;  
    UINT32 eqDelayElements2;  
    UINT32 eqDelayElements3;  
    UINT32 eqDelayElements4;  
    UINT32 eqDelayElements5;  
    UINT32 eqDelayElements6;  
    UINT32 eqDelayElements7;  
    UINT32 compInputLevel;  
    UINT32 compGainReduction : 24;  
    UINT32 reserved4 : 8;  
    UINT32 compGain : 16;  
    UINT32 reserved5 : 16;  
    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 reserved6 : 24;  
    UINT32 compRelease : 24;  
    UINT32 reserved7 : 2;  
    UINT32 compExpand : 1;  
    UINT32 compLogGain : 1;  
    UINT32 compSidechainMode : 2;  
    UINT32 compMode : 1;  
    UINT32 compEnable : 1;  
    UINT32 compThreshold : 24;  
    UINT32 reserved8 : 8;  
    UINT32 compAttack : 24;  
    UINT32 reserved9 : 8;  
    UINT32 compOneOverRatio : 16;  
    UINT32 compGainTarget : 16;  
} SHAPE_EQCOMP_CONTEXT  
```

### Members

*timestamp*\
Type: UINT32

Read: Time stamp for the completion of context processing.

*Reserved0*\
Type: UINT32

Reserved.

*internalSaturate*\
Type: UINT32

Read: 1 if EQ/Comp is saturated; 0 otherwise.

*mixBufPeakMag*\
Type: UINT32

Read: Peak magnitude of the output mix buffer.

*peakMag*\
Type: UINT32

Read: Peak magnitude of the output.

*eqAB0*\
Type: UINT32

Read/Write: Coefficient b0 for equalizer filter A.

*eqAB1\_L*\
Type: UINT32

Read/Write: Coefficient b1 for equalizer filter A, low 8 bits.

*eqAB1\_H*\
Type: UINT32

Read/Write: Coefficient b1 for equalizer filter A, high 16 bits.

*eqAB2\_L*\
Type: UINT32

Read/Write: Coefficient b2 for equalizer filter A, low 16 bits.

*eqAB2\_H*\
Type: UINT32

Read/Write: Coefficient b2 for equalizer filter A, high 8 bits.

*eqAA1*\
Type: UINT32

Read/Write: Coefficient a1 for equalizer filter A.

*eqAA2*\
Type: UINT32

Read/Write: Coefficient a2 for equalizer filter A.

*eqBB0\_L*\
Type: UINT32

Read/Write: Coefficient b0 for equalizer filter B, low 8 bits.

*eqBB0\_H*\
Type: UINT32

Read/Write: Coefficient b0 for equalizer filter B, high 16 bits.

*eqBB1\_L*\
Type: UINT32

Read/Write: Coefficient b1 for equalizer filter B, low 16 bits.

*eqBB1\_H*\
Type: UINT32

Read/Write: Coefficient b1 for equalizer filter B, high 8 bits.

*eqBB2*\
Type: UINT32

Read/Write: Coefficient b2 for equalizer filter B.

*eqBA1*\
Type: UINT32

Read/Write: Coefficient a1 for equalizer filter B.

*eqBA2\_L*\
Type: UINT32

Read/Write: Coefficient a2 for equalizer filter B, low 8 bits.

*eqBA2\_H*\
Type: UINT32

Read/Write: Coefficient a2 for equalizer filter B, high 16 bits.

*eqCB0\_L*\
Type: UINT32

Read/Write: Coefficient b0 for equalizer filter C, low 16 bits.

*eqCB0\_H*\
Type: UINT32

Read/Write: Coefficient b0 for equalizer filter C, high 8 bits.

*eqCB1*\
Type: UINT32

Read/Write: Coefficient b1 for equalizer filter C.

*eqCB2*\
Type: UINT32

Read/Write: Coefficient b2 for equalizer filter C.

*eqCA1\_L*\
Type: UINT32

Read/Write: Coefficient a1 for equalizer filter C, low 8 bits.

*eqCA1\_H*\
Type: UINT32

Read/Write: Coefficient a1 for equalizer filter C, high 16 bits.

*eqCA2\_L*\
Type: UINT32

Read/Write: Coefficient a2 for equalizer filter C, low 16 bits.

*eqCA2\_H*\
Type: UINT32

Read/Write: Coefficient a2 for equalizer filter C, high 8 bits.

*Reserved1*\
Type: UINT32

Reserved.

*eqAInputDelay0*\
Type: UINT32

Read: Input delay for left channel.

*Reserved2*\
Type: UINT32

Reserved.

*eqAInputDelay1*\
Type: UINT32

Read: Input delay for right channel.

*Reserved*\
Type: UINT32

Reserved.

*eqDelayElements2*\
Type: UINT32

Read: Delay element.

*eqDelayElements3*\
Type: UINT32

Read: Delay element.

*eqDelayElements4*\
Type: UINT32

Read: Delay element.

*eqDelayElements5*\
Type: UINT32

Read: Delay element.

*eqDelayElements6*\
Type: UINT32

Read: Delay element.

*eqDelayElements7*\
Type: UINT32

Read: Delay element.

*compInputLevel*\
Type: UINT32

Read: InputLevel calculated for the input to the compressor, in u8.23 format (-0x0000\_0000 to 0x7FFF\_FFFF). The eight integer bits allow the equalizer section to have a gain of up to 48 dB prior to the compressor, without clipping.

*compGainReduction*\
Type: UINT32

Read: Calculated attenuation for the compressor, in u1.23 format (-0x00\_0000 to 0x80\_0000). This is a linear multiplier; a value of 0x40\_0000, which corresponds to 0.5, is a gain of -6 dB or a gain reduction of 6 dB.

*Reserved4*\
Type: UINT32

Reserved.

*compGain*\
Type: UINT32

Read/Write: Current output (makeup) gain value, in u3.13 format (-0x0000 to 0xFFFF).

*Reserved5*\
Type: UINT32

Reserved.

*eqAB0Target*\
Type: UINT32

Read/Write: Coefficient target b0 for equalizer filter A.

*eqAB1Target\_L*\
Type: UINT32

Read/Write: Coefficient target b1 for equalizer filter A, low 8 bits.

*eqAB1Target\_H*\
Type: UINT32

Read/Write: Coefficient target b1 for equalizer filter A, high 16 bits.

*eqAB2Target\_L*\
Type: UINT32

Read/Write: Coefficient target b2 for equalizer filter A, low 16 bits.

*eqAB2Target\_H*\
Type: UINT32

Read/Write: Coefficient target b2 for equalizer filter A, high 8 bits.

*eqAA1Target*\
Type: UINT32

Read/Write: Coefficient target a1 for equalizer filter A.

*eqAA2Target*\
Type: UINT32

Read/Write: Coefficient target a2 for equalizer filter A.

*eqBB0Target\_L*\
Type: UINT32

Read/Write: Coefficient target b0 for equalizer filter B, low 8 bits.

*eqBB0Target\_H*\
Type: UINT32

Read/Write: Coefficient target b0 for equalizer filter B, high 16 bits.

*eqBB1Target\_L*\
Type: UINT32

Read/Write: Coefficient target b1 for equalizer filter B, low 16 bits.

*eqBB1Target\_H*\
Type: UINT32

Read/Write: Coefficient target b1 for equalizer filter B, high 8 bits.

*eqBB2Target*\
Type: UINT32

Read/Write: Coefficient target b2 for equalizer filter B.

*eqBA1Target*\
Type: UINT32

Read/Write: Coefficient target a1 for equalizer filter B.

*eqBA2Target\_L*\
Type: UINT32

Read/Write: Coefficient target a2 for equalizer filter B, low 8 bits.

*eqBA2Target\_H*\
Type: UINT32

Read/Write: Coefficient target a2 for equalizer filter B, high 16 bits.

*eqCB0Target\_L*\
Type: UINT32

Read/Write: Coefficient target b0 for equalizer filter C, low 16 bits.

*eqCB0Target\_H*\
Type: UINT32

Read/Write: EQCoefficient target b0 for equalizer filter C, high 8 bits.

*eqCB1Target*\
Type: UINT32

Read/Write: Coefficient target b1 for equalizer filter C.

*eqCB2Target*\
Type: UINT32

Read/Write: Coefficient target b2 for equalizer filter C.

*eqCA1Target\_L*\
Type: UINT32

Read/Write: Coefficient target a1 for equalizer filter C, low 8 bits.

*eqCA1Target\_H*\
Type: UINT32

Read/Write: Coefficient target a1 for equalizer filter C, high 16 bits.

*eqCA2Target\_L*\
Type: UINT32

Read/Write: Coefficient target a2 for equalizer filter C, low 16 bits.

*eqCA2Target\_H*\
Type: UINT32

Read/Write: Coefficient target a2 for equalizer filter C, high 8 bits.

*Reserved6*\
Type: UINT32

Reserved.

*compRelease*\
Type: UINT32

Write: Release rate for the compressor, in u1.23 format (-0x00\_0001 to 0x80\_0000). This is the amount by which *compGainReduction* is incremented for each sample period when the compressor/expander is in the release phase. If *compLogGain* is set, *compRelease* is shifted right to align bit 23 with the most significant bit of the current value of *compGainReduction*; this causes the increment to be exponential. The value 0 is not valid for this member and will cause incorrect operation.

*Reserved7*\
Type: UINT32

Reserved.

*compExpand*\
Type: UINT32

Write: Refer to SHAPE\_EQCOMP\_EXPAND\_MODE.

*compLogGain*\
Type: UINT32

Write: Refer to SHAPE\_EQCOMP\_LOG\_GAIN. This causes the attack and release phases to decrement and increment the gain reduction exponentially, to make it linear in logarithmic space; that is, linear in dB.

*compSidechainMode*\
Type: UINT32

Write: Refer to SHAPE\_EQCOMP\_SIDECHAIN\_MODE.

*compMode*\
Type: UINT32

Write: Refer to SHAPE\_EQCOMP\_COMPRESSOR\_MODE.

*compEnable*\
Type: UINT32

Write: 1 == enabled, 0 == disabled.

*compThreshold*\
Type: UINT32

Write: Threshold value, in u1.23 format (-0x00\_0000 to 0x80\_0000).

*Reserved8*\
Type: UINT32

Reserved.

*compAttack*\
Type: UINT32

Write: Attack rate for the compressor, in u1.23 format (-0x00\_0001 to 0x80\_0000). This is the amount by which *compGainReduction* is decremented for each sample period when the compressor/expander is in the attack phase. If *compLogGain* is set, *compAttack* is shifted right to align bit 23 with the most significant bit of the current value of *compGainReduction*; this causes the increment to be exponential. The value 0 is not valid for this member and will cause incorrect operation.

*Reserved9*\
Type: UINT32

Reserved.

*compOneOverRatio*\
Type: UINT32

Write: Slope for the compressor, in u1.15 format (-0x0000 to 0x8000). This is the reciprocal of the traditional ratio control on compressors. For a ratio of 1:1, set *compOneOverRatio* to 0x8000. For a ratio of 4:1, set *compOneOverRatio* to 0x2000. The value 0x0000 is a ratio of infinite:1.

*compGainTarget*\
Type: UINT32

Write: User-settable target for the output (makeup) gain. During one audio frame, the gain will ramp from the current value to *compGainTarget*, in u3.13 format (-0x0000 to 0xFFFF).

## Remarks

This structure contains the context for the equalizer (EQ) and compressor. The Scalable Hardware Audio Processing Engine (SHAPE) can process up to 512 EQComp contexts per audio frame.

For more information, see [Equalization and compression](/build/console-features/audio/overviews/shape-overview#ID4ECF) in [Overview of SHAPE](/build/console-features/audio/overviews/shape-overview).

## Requirements

**Header:** shapeeqcompcontext.h

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

## Conceptual documentation

* [ACP overview](/build/console-features/audio/overviews/acp-overview)

## See also

[ShapeEqCompContext](/reference/audio/shapeeqcompcontext/shapeeqcompcontext_members)


## Related topics

- [ShapeEqCompContext](/reference/audio/shapeeqcompcontext/shapeeqcompcontext_members.md)
- [ACP_COMMAND_UPDATE_EQCOMP_CONTEXT_ENTRY](/reference/audio/acphal/structs/acp_command_update_eqcomp_context_entry.md)
- [SHAPE_EQCOMP_FILTER_INDEX](/reference/audio/shapeeqcompcontext/enums/shape_eqcomp_filter_index.md)
- [SHAPE_EQCOMP_COMPRESSOR_MODE](/reference/audio/shapeeqcompcontext/enums/shape_eqcomp_compressor_mode.md)
- [SHAPE_CONTEXTS](/reference/audio/acphal/structs/shape_contexts.md)
