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

# GetShapeEqCompRatio

> GetShapeEqCompRatio

# GetShapeEqCompRatio

取得壓縮比。

## 語法

```cpp theme={null}
float GetShapeEqCompRatio(  
         const SHAPE_EQCOMP_CONTEXT* context  
)  
```

### 參數

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

指向 SHAPE\_EQCOMP\_CONTEXT 物件的指標。

### 傳回值

類型：float

壓縮比。

## 備註

壓縮器會根據輸入位準與輸出位準的比率來改變聲音資料。比率決定輸入訊號超過臨界值時應進行多少衰減。例如，在 2:1 的比率下，超過臨界值的每 2 dB 位準，會讓壓縮器輸出超過臨界值位準 1 dB。若比率為 1:1，壓縮器基本上處於關閉狀態。

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

## 另請參閱

[ShapeEqCompContext](/zh-TW/reference/audio/shapeeqcompcontext/shapeeqcompcontext_members)


## Related topics

- [ShapeEqCompContext](/zh-TW/reference/audio/shapeeqcompcontext/shapeeqcompcontext_members.md)
- [SetShapeEqCompRatio](/zh-TW/reference/audio/shapeeqcompcontext/functions/setshapeeqcompratio.md)
- [GetShapeEqCompGain](/zh-TW/reference/audio/shapeeqcompcontext/functions/getshapeeqcompgain.md)
- [GetShapeEqCompRelease](/zh-TW/reference/audio/shapeeqcompcontext/functions/getshapeeqcomprelease.md)
- [GetShapeEqCompThreshold](/zh-TW/reference/audio/shapeeqcompcontext/functions/getshapeeqcompthreshold.md)
