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

# SetShapeEqCompCompressorMode

> SetShapeEqCompCompressorMode

# SetShapeEqCompCompressorMode

Sets the compression mode.

## Syntax

```cpp theme={null}
HRESULT SetShapeEqCompCompressorMode(  
         SHAPE_EQCOMP_CONTEXT* context,  
         SHAPE_EQCOMP_COMPRESSOR_MODE mode  
)  
```

### Parameters

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

Pointer to a SHAPE\_EQCOMP\_CONTEXT object.

*mode*   \
Type: [SHAPE\_EQCOMP\_COMPRESSOR\_MODE](/reference/audio/shapeeqcompcontext/enums/shape_eqcomp_compressor_mode)

A member of the SHAPE\_EQCOMP\_COMPRESSOR\_MODE enumeration.

### Return value

Type: HRESULT

HRESULT success or error code.

## Remarks

In normal mode, the input level is instantaneous, with compression calculated for each sample. In RMS mode, a running average, representing an approximation of the RMS value, of the previous 128 samples is used as the input level, rather than the absolute level of the current input sample. (The running average is an approximation of the RMS value.)

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

[GetShapeEqCompCompressorMode](/reference/audio/shapeeqcompcontext/functions/getshapeeqcompcompressormode)\
[ShapeEqCompContext](/reference/audio/shapeeqcompcontext/shapeeqcompcontext_members)


## Related topics

- [GetShapeEqCompCompressorMode](/reference/audio/shapeeqcompcontext/functions/getshapeeqcompcompressormode.md)
- [SHAPE_EQCOMP_COMPRESSOR_MODE](/reference/audio/shapeeqcompcontext/enums/shape_eqcomp_compressor_mode.md)
- [ShapeEqCompContext](/reference/audio/shapeeqcompcontext/shapeeqcompcontext_members.md)
- [SetShapeEqCompSidechainMode](/reference/audio/shapeeqcompcontext/functions/setshapeeqcompsidechainmode.md)
- [SetShapeEqCompExpandMode](/reference/audio/shapeeqcompcontext/functions/setshapeeqcompexpandmode.md)
