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

# SetShapeEqCompFilterTargetCoefficients

> SetShapeEqCompFilterTargetCoefficients

# SetShapeEqCompFilterTargetCoefficients

设置均衡器滤波器的目标系数。

## 语法

```cpp theme={null}
HRESULT SetShapeEqCompFilterTargetCoefficients(  
         SHAPE_EQCOMP_CONTEXT* context,  
         SHAPE_EQCOMP_FILTER_INDEX filterIndex,  
         float a1,  
         float a2,  
         float b0,  
         float b1,  
         float b2  
)  
```

### 参数

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

指向 SHAPE\_EQCOMP\_CONTEXT 结构的指针。

*filterIndex*   \
类型：[SHAPE\_EQCOMP\_FILTER\_INDEX](/reference/audio/shapeeqcompcontext/enums/shape_eqcomp_filter_index)

SHAPE\_EQCOMP\_FILTER\_INDEX 枚举的一个成员。

*a1*   \
类型：float

指定均衡器滤波器的目标系数 a1。

*a2*   \
类型：float

指定均衡器滤波器的目标系数 a2。

*b0*   \
类型：float

指定均衡器滤波器的目标系数 b0。

*b1*   \
类型：float

指定均衡器滤波器的目标系数 b1。

*b2*   \
类型：float

指定均衡器滤波器的目标系数 b2。

### 返回值

类型：HRESULT

HRESULT 成功或错误代码。

## 备注

每个双二阶滤波器的系数（b0、b1、b2、a1 和 a2）以 24 位整数存储。这样系数范围可以达到 ±7.998，适合为允许的滤波器类型提供系数：频率范围为 20 Hz 到 18 kHz，增益范围为 -18 dB 到 18 dB。

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

## 要求

**头文件：** shapeeqcompcontext.h

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

## 另请参阅

[ShapeEqCompContext](/reference/audio/shapeeqcompcontext/shapeeqcompcontext_members)


## Related topics

- [ShapeEqCompContext](/zh-CN/reference/audio/shapeeqcompcontext/shapeeqcompcontext_members.md)
- [SetShapeEqCompRawFilterTargetCoefficients](/zh-CN/reference/audio/shapeeqcompcontext/functions/setshapeeqcomprawfiltertargetcoefficients.md)
- [GetShapeEqCompFilterTargetCoefficients](/zh-CN/reference/audio/shapeeqcompcontext/functions/getshapeeqcompfiltertargetcoefficients.md)
- [GetShapeEqCompRawFilterTargetCoefficients](/zh-CN/reference/audio/shapeeqcompcontext/functions/getshapeeqcomprawfiltertargetcoefficients.md)
- [SetShapeEqCompFilterCoefficients](/zh-CN/reference/audio/shapeeqcompcontext/functions/setshapeeqcompfiltercoefficients.md)
