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

# SetShapeEqCompThreshold

> SetShapeEqCompThreshold

# SetShapeEqCompThreshold

設定壓縮臨界值。

## 語法

```cpp theme={null}
HRESULT SetShapeEqCompThreshold(  
         SHAPE_EQCOMP_CONTEXT* context,  
         float threshold  
)  
```

### 參數

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

指向 `SHAPE_EQCOMP_CONTEXT` 物件的指標。

*threshold*   \
類型：float

壓縮臨界值。

### 傳回值

類型：HRESULT

HRESULT 成功或錯誤碼。

## 備註

壓縮器只會作用於超過特定臨界值的訊號；低於臨界值的訊號會原封不動地通過。

壓縮器會根據一個指定輸入位準與輸出位準比率的參數來改變聲音資料。此比率代表輸入訊號超過臨界值時要進行的衰減程度。(如果壓縮器/擴展器模式設定為 `SHAPE_EQCOMP_EXPAND_MODE_EXPANDER`，行為則會相反。擴展器會作用於低於特定臨界值的訊號；高於臨界值的訊號會原封不動地通過。)

如需詳細資訊，請參閱 [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 主機

## 另請參閱

[GetShapeEqCompThreshold](/zh-TW/reference/audio/shapeeqcompcontext/functions/getshapeeqcompthreshold)\
[ShapeEqCompContext](/zh-TW/reference/audio/shapeeqcompcontext/shapeeqcompcontext_members)


## Related topics

- [GetShapeEqCompThreshold](/zh-TW/reference/audio/shapeeqcompcontext/functions/getshapeeqcompthreshold.md)
- [SetShapeEqCompExpandMode](/zh-TW/reference/audio/shapeeqcompcontext/functions/setshapeeqcompexpandmode.md)
- [ShapeEqCompContext](/zh-TW/reference/audio/shapeeqcompcontext/shapeeqcompcontext_members.md)
- [SetShapeEqCompAttack](/zh-TW/reference/audio/shapeeqcompcontext/functions/setshapeeqcompattack.md)
- [SetShapeEqCompGain](/zh-TW/reference/audio/shapeeqcompcontext/functions/setshapeeqcompgain.md)
