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

# SetShapeEqCompExpandMode

> SetShapeEqCompExpandMode

# SetShapeEqCompExpandMode

Sets the compression/expansion mode.

## Syntax

```cpp theme={null}
HRESULT SetShapeEqCompExpandMode(  
         SHAPE_EQCOMP_CONTEXT* context,  
         SHAPE_EQCOMP_EXPAND_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\_EXPAND\_MODE](/reference/audio/shapeeqcompcontext/enums/shape_eqcomp_expand_mode)

A member of the `SHAPE_EQCOMP_EXPAND_MODE` enumeration.

### Return value

Type: HRESULT

HRESULT success or error code.

## Remarks

Typically, the EQ/Compressor-Expander block limits the dynamic range of the signal. The compressor acts only on signals that exceed a specific threshold; signals under the threshold pass through unaltered.

When the 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

[GetShapeEqCompExpandMode](/reference/audio/shapeeqcompcontext/functions/getshapeeqcompexpandmode)\
[SetShapeEqCompThreshold](/reference/audio/shapeeqcompcontext/functions/setshapeeqcompthreshold)\
[ShapeEqCompContext](/reference/audio/shapeeqcompcontext/shapeeqcompcontext_members)


## Related topics

- [GetShapeEqCompExpandMode](/reference/audio/shapeeqcompcontext/functions/getshapeeqcompexpandmode.md)
- [ShapeEqCompContext](/reference/audio/shapeeqcompcontext/shapeeqcompcontext_members.md)
- [SetShapeEqCompThreshold](/reference/audio/shapeeqcompcontext/functions/setshapeeqcompthreshold.md)
- [SetShapeEqCompCompressorMode](/reference/audio/shapeeqcompcontext/functions/setshapeeqcompcompressormode.md)
- [SetShapeEqCompSidechainMode](/reference/audio/shapeeqcompcontext/functions/setshapeeqcompsidechainmode.md)
