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

# SetShapeEqCompThreshold

> SetShapeEqCompThreshold

# SetShapeEqCompThreshold

Sets the compression threshold.

## Syntax

```cpp theme={null}
HRESULT SetShapeEqCompThreshold(  
         SHAPE_EQCOMP_CONTEXT* context,  
         float threshold  
)  
```

### Parameters

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

Pointer to a `SHAPE_EQCOMP_CONTEXT` object.

*threshold*   \
Type: float

The compression threshold value.

### Return value

Type: HRESULT

HRESULT success or error code.

## Remarks

The compressor acts only on signals that exceed a specific threshold; signals under the threshold pass through unaltered.

The compressor alters the sound data according to a parameter that specifies the ratio of incoming level to outgoing level. The ratio represents the extent of attenuation to be performed on the incoming signal if it exceeds the threshold. (If the compressor/expander mode is set to `SHAPE_EQCOMP_EXPAND_MODE_EXPANDER`, the behavior is reversed. The expander acts on signals below a specific threshold; signals above the threshold pass through unaltered.)

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

[GetShapeEqCompThreshold](/reference/audio/shapeeqcompcontext/functions/getshapeeqcompthreshold)\
[ShapeEqCompContext](/reference/audio/shapeeqcompcontext/shapeeqcompcontext_members)
