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

# SetShapeEqCompLogGain

> 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\*](/reference/audio/shapeeqcompcontext/structs/shape_eqcomp_context)

Pointer to a `SHAPE_EQCOMP_CONTEXT` object.

*mode*   \
Type: [SHAPE\_EQCOMP\_LOG\_GAIN](/reference/audio/shapeeqcompcontext/enums/shape_eqcomp_log_gain)

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](/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

[GetShapeEqCompLogGain](/reference/audio/shapeeqcompcontext/functions/getshapeeqcomploggain)\
[SHAPE\_EQCOMP\_LOG\_GAIN](/reference/audio/shapeeqcompcontext/enums/shape_eqcomp_log_gain)\
[ShapeEqCompContext](/reference/audio/shapeeqcompcontext/shapeeqcompcontext_members)


## Related topics

- [GetShapeEqCompLogGain](/reference/audio/shapeeqcompcontext/functions/getshapeeqcomploggain.md)
- [SHAPE_EQCOMP_LOG_GAIN](/reference/audio/shapeeqcompcontext/enums/shape_eqcomp_log_gain.md)
- [ShapeEqCompContext](/reference/audio/shapeeqcompcontext/shapeeqcompcontext_members.md)
- [SetShapeEqCompGain](/reference/audio/shapeeqcompcontext/functions/setshapeeqcompgain.md)
- [SetShapeEqCompAttack](/reference/audio/shapeeqcompcontext/functions/setshapeeqcompattack.md)
