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

# SetShapeEqCompEnableCompressor

> SetShapeEqCompEnableCompressor

# SetShapeEqCompEnableCompressor

Sets the state of the compressor flag.

## Syntax

```cpp theme={null}
HRESULT SetShapeEqCompEnableCompressor(  
         SHAPE_EQCOMP_CONTEXT* context,  
         bool enable  
)  
```

### Parameters

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

Pointer to a SHAPE\_EQCOMP\_CONTEXT object.

*enable*   \
Type: bool

True to enable the compressor portion of the equalizer/compressor-expander block.

### Return value

Type: HRESULT

HRESULT success or error code.

## Remarks

The compressor limits the dynamic range of the signal by monitoring the level of input and creating a dynamic gain value. The compressor then uses the gain value as a multiplier of the signal, scaling it according to the current level of the input signal. In other words, the compressor is an automatic volume control that constantly monitors the input signal and adjusts itself.

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

- [SHAPE_EQCOMP_EXPAND_MODE](/reference/audio/shapeeqcompcontext/enums/shape_eqcomp_expand_mode.md)
- [ShapeEqCompContext](/reference/audio/shapeeqcompcontext/shapeeqcompcontext_members.md)
- [GetShapeEqCompEnableCompressor](/reference/audio/shapeeqcompcontext/functions/getshapeeqcompenablecompressor.md)
- [SetShapeEqCompCompressorMode](/reference/audio/shapeeqcompcontext/functions/setshapeeqcompcompressormode.md)
- [GetShapeEqCompCompressorMode](/reference/audio/shapeeqcompcontext/functions/getshapeeqcompcompressormode.md)
