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

設定壓縮器輸出 (補償) 增益的目標。

## 語法

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

### 參數

*context*   \_Inout\_
類型：[SHAPE\_EQCOMP\_CONTEXT\*](/zh-TW/reference/audio/shapeeqcompcontext/structs/shape_eqcomp_context)

指向 `SHAPE_EQCOMP_CONTEXT` 物件的指標。

*gainTarget*   
類型：float

增益目標。

### 傳回值

類型：HRESULT

HRESULT 成功或錯誤碼。

## 備註

壓縮器會監視輸入位準並建立動態增益值，藉此限制訊號的動態範圍。接著，壓縮器會將增益值作為訊號的乘數，根據輸入訊號的目前位準適當地縮放訊號。換句話說，壓縮器是一種自動音量控制，會持續監視輸入訊號並自行調整。

如需詳細資訊，請參閱 [SHAPE 概觀](/zh-TW/build/console-features/audio/overviews/shape-overview)中的[等化與壓縮](/zh-TW/build/console-features/audio/overviews/shape-overview#ID4ECF)。

## 需求

**標頭：** shapeeqcompcontext.h

**支援的平台：** XBOX One 系列主機與 XBOX Series 主機

## 另請參閱

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


## Related topics

- [GetShapeEqCompGainTarget](/zh-TW/reference/audio/shapeeqcompcontext/functions/getshapeeqcompgaintarget.md)
- [ShapeEqCompContext](/zh-TW/reference/audio/shapeeqcompcontext/shapeeqcompcontext_members.md)
- [SetShapeEqCompGain](/zh-TW/reference/audio/shapeeqcompcontext/functions/setshapeeqcompgain.md)
- [SetShapeEqCompLogGain](/zh-TW/reference/audio/shapeeqcompcontext/functions/setshapeeqcomploggain.md)
- [GetShapeEqCompGain](/zh-TW/reference/audio/shapeeqcompcontext/functions/getshapeeqcompgain.md)
