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

# SetShapeEqCompFilterCoefficients

> SetShapeEqCompFilterCoefficients

# SetShapeEqCompFilterCoefficients

Sets the coefficients of an equalizer filter.

## Syntax

```cpp theme={null}
HRESULT SetShapeEqCompFilterCoefficients(  
         SHAPE_EQCOMP_CONTEXT* context,  
         SHAPE_EQCOMP_FILTER_INDEX filterIndex,  
         float a1,  
         float a2,  
         float b0,  
         float b1,  
         float b2  
)  
```

### Parameters

*context*   \_Inout\_\
Type: [SHAPE\_EQCOMP\_CONTEXT\*](/reference/audio/shapeeqcompcontext/structs/shape_eqcomp_context)

Pointer to a SHAPE\_EQCOMP\_CONTEXT structure.

*filterIndex*   \
Type: [SHAPE\_EQCOMP\_FILTER\_INDEX](/reference/audio/shapeeqcompcontext/enums/shape_eqcomp_filter_index)

A member of the SHAPE\_EQCOMP\_FILTER\_INDEX enumeration.

*a1*   \
Type: float

Coefficient a1 for the specified equalizer filter.

*a2*   \
Type: float

Coefficient a2 for the specified equalizer filter.

*b0*   \
Type: float

Coefficient b0 for the specified equalizer filter.

*b1*   \
Type: float

Coefficient b1 for the specified equalizer filter.

*b2*   \
Type: float

Coefficient b2 for the specified equalizer filter.

### Return value

Type: HRESULT

HRESULT success or error code.

## Remarks

The coefficients of each biquad filter (b0, b1, b2, a1, and a2) are stored as 24-bit integers. This allows for a coefficient range of up to ±7.998, which is suitable for providing coefficients for the types of filters allowed: a frequency range of 20 Hz to 18 kHz, and a gain range of -18 dB to 18 dB.

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

## See also

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


## Related topics

- [ShapeEqCompContext](/reference/audio/shapeeqcompcontext/shapeeqcompcontext_members.md)
- [SetShapeEqCompFilterTargetCoefficients](/reference/audio/shapeeqcompcontext/functions/setshapeeqcompfiltertargetcoefficients.md)
- [SetShapeEqCompRawFilterCoefficients](/reference/audio/shapeeqcompcontext/functions/setshapeeqcomprawfiltercoefficients.md)
- [SetShapeEqCompRawFilterTargetCoefficients](/reference/audio/shapeeqcompcontext/functions/setshapeeqcomprawfiltertargetcoefficients.md)
- [GetShapeEqCompFilterCoefficients](/reference/audio/shapeeqcompcontext/functions/getshapeeqcompfiltercoefficients.md)
