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

# SetShapeEqCompLogGain

> SetShapeEqCompLogGain

Sets the log gain mode of the compressor.

## Syntax

```cpp theme={null}
HRESULT SetShapeEqCompLogGain(  
         SHAPE_EQCOMP_CONTEXT* context,  
         SHAPE_EQCOMP_LOG_GAIN 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\_LOG\_GAIN](https://docs.xbox.com/reference/audio/shapeeqcompcontext/enums/shape_eqcomp_log_gain.md)

A member of the `SHAPE_EQCOMP_LOG_GAIN` enumeration.

### Return value

Type: HRESULT

HRESULT success or error code.

## Remarks

The attack and release values specify how quickly the compressor is to vary the output gain in response to a signal that exceeds the threshold or falls below it. These adjustments can be linear or log based.

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

[GetShapeEqCompLogGain](https://docs.xbox.com/reference/audio/shapeeqcompcontext/functions/getshapeeqcomploggain.md)\
[SHAPE\_EQCOMP\_LOG\_GAIN](https://docs.xbox.com/reference/audio/shapeeqcompcontext/enums/shape_eqcomp_log_gain.md)\
[ShapeEqCompContext](https://docs.xbox.com/reference/audio/shapeeqcompcontext/shapeeqcompcontext_members.md)


## Related topics

- [GetShapeEqCompLogGain](https://docs.xbox.com/reference/audio/shapeeqcompcontext/functions/getshapeeqcomploggain.md)
- [SHAPE_EQCOMP_LOG_GAIN](https://docs.xbox.com/reference/audio/shapeeqcompcontext/enums/shape_eqcomp_log_gain.md)
- [ShapeEqCompContext](https://docs.xbox.com/reference/audio/shapeeqcompcontext/shapeeqcompcontext_members.md)
- [SetShapeEqCompGain](https://docs.xbox.com/reference/audio/shapeeqcompcontext/functions/setshapeeqcompgain.md)
- [SetShapeEqCompGainTarget](https://docs.xbox.com/reference/audio/shapeeqcompcontext/functions/setshapeeqcompgaintarget.md)
