> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 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\*](https://docs.xbox.com/reference/audio/shapeeqcompcontext/structs/shape_eqcomp_context.md)

Pointer to a `SHAPE_EQCOMP_CONTEXT` object.

*mode*   \
Type: [SHAPE\_EQCOMP\_EXPAND\_MODE](https://docs.xbox.com/reference/audio/shapeeqcompcontext/enums/shape_eqcomp_expand_mode.md)

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](https://docs.xbox.com/build/console-features/audio/overviews/shape-overview.md#ID4ECF) in [Overview of SHAPE](https://docs.xbox.com/build/console-features/audio/overviews/shape-overview.md).

## Requirements

**Header:** shapeeqcompcontext.h

**Supported platforms:** XBOX One family consoles and XBOX Series consoles

## See also

[GetShapeEqCompExpandMode](https://docs.xbox.com/reference/audio/shapeeqcompcontext/functions/getshapeeqcompexpandmode.md)\
[SetShapeEqCompThreshold](https://docs.xbox.com/reference/audio/shapeeqcompcontext/functions/setshapeeqcompthreshold.md)\
[ShapeEqCompContext](https://docs.xbox.com/reference/audio/shapeeqcompcontext/shapeeqcompcontext_members.md)


## Related topics

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