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

指向 `SHAPE_EQCOMP_CONTEXT` 对象的指针。

*mode*   \
类型：[SHAPE\_EQCOMP\_EXPAND\_MODE](/reference/audio/shapeeqcompcontext/enums/shape_eqcomp_expand_mode)

`SHAPE_EQCOMP_EXPAND_MODE` 枚举的一个成员。

### 返回值

类型：HRESULT

HRESULT 成功或错误代码。

## 备注

通常，EQ/压缩器-扩展器模块会限制信号的动态范围。压缩器仅作用于超过特定阈值的信号；低于阈值的信号原样通过。

当模式设置为 `SHAPE_EQCOMP_EXPAND_MODE_EXPANDER` 时，行为相反：扩展器作用于低于特定阈值的信号；高于阈值的信号原样通过。

有关详细信息，请参阅 [SHAPE 概述](/build/console-features/audio/overviews/shape-overview) 中的 [均衡与压缩](/build/console-features/audio/overviews/shape-overview#ID4ECF)。

## 要求

**头文件：** shapeeqcompcontext.h

**支持的平台：** XBOX One 系列主机和 XBOX Series 主机

## 另请参阅

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


## Related topics

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