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

# SetShapeEqCompGainTarget

> SetShapeEqCompGainTarget

# SetShapeEqCompGainTarget

Sets the target for the output (makeup) gain of the compressor.

## Syntax

```cpp theme={null}
HRESULT SetShapeEqCompGainTarget(  
         SHAPE_EQCOMP_CONTEXT* context,  
         float gainTarget  
)  
```

### Parameters

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

Pointer to a `SHAPE_EQCOMP_CONTEXT` object.

*gainTarget*   
Type: float

The gain target.

### 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 appropriately, according to the current level of the input signal. In other words, the compressor is an automatic volume control that is constantly monitoring the input signal and adjusting 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

[GetShapeEqCompGainTarget](/reference/audio/shapeeqcompcontext/functions/getshapeeqcompgaintarget)\
[ShapeEqCompContext](/reference/audio/shapeeqcompcontext/shapeeqcompcontext_members)


## Related topics

- [GetShapeEqCompGainTarget](/reference/audio/shapeeqcompcontext/functions/getshapeeqcompgaintarget.md)
- [ShapeEqCompContext](/reference/audio/shapeeqcompcontext/shapeeqcompcontext_members.md)
- [SetShapeEqCompFilterTargetCoefficients](/reference/audio/shapeeqcompcontext/functions/setshapeeqcompfiltertargetcoefficients.md)
- [SetShapeEqCompRawFilterTargetCoefficients](/reference/audio/shapeeqcompcontext/functions/setshapeeqcomprawfiltertargetcoefficients.md)
- [SetShapeEqCompGain](/reference/audio/shapeeqcompcontext/functions/setshapeeqcompgain.md)
