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

# SetShapeEqCompExpandMode

> SetShapeEqCompExpandMode

# SetShapeEqCompExpandMode

設定壓縮/擴展模式。

## 語法

```cpp theme={null}
HRESULT SetShapeEqCompExpandMode(  
         SHAPE_EQCOMP_CONTEXT* context,  
         SHAPE_EQCOMP_EXPAND_MODE mode  
)  
```

### 參數

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

指向 `SHAPE_EQCOMP_CONTEXT` 物件的指標。

*mode*   \
類型：[SHAPE\_EQCOMP\_EXPAND\_MODE](/zh-TW/reference/audio/shapeeqcompcontext/enums/shape_eqcomp_expand_mode)

`SHAPE_EQCOMP_EXPAND_MODE` 列舉的成員。

### 傳回值

類型：HRESULT

HRESULT 成功或錯誤碼。

## 備註

一般而言，EQ/壓縮器-擴展器區塊會限制訊號的動態範圍。壓縮器只會作用於超過特定臨界值的訊號；低於臨界值的訊號會原封不動地通過。

當模式設定為 `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 主機

## 另請參閱

[GetShapeEqCompExpandMode](/zh-TW/reference/audio/shapeeqcompcontext/functions/getshapeeqcompexpandmode)\
[SetShapeEqCompThreshold](/zh-TW/reference/audio/shapeeqcompcontext/functions/setshapeeqcompthreshold)\
[ShapeEqCompContext](/zh-TW/reference/audio/shapeeqcompcontext/shapeeqcompcontext_members)


## Related topics

- [GetShapeEqCompExpandMode](/zh-TW/reference/audio/shapeeqcompcontext/functions/getshapeeqcompexpandmode.md)
- [ShapeEqCompContext](/zh-TW/reference/audio/shapeeqcompcontext/shapeeqcompcontext_members.md)
- [SetShapeEqCompThreshold](/zh-TW/reference/audio/shapeeqcompcontext/functions/setshapeeqcompthreshold.md)
- [SetShapeEqCompCompressorMode](/zh-TW/reference/audio/shapeeqcompcontext/functions/setshapeeqcompcompressormode.md)
- [SetShapeEqCompSidechainMode](/zh-TW/reference/audio/shapeeqcompcontext/functions/setshapeeqcompsidechainmode.md)
