> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SetShapeFiltVolOutputGain

> SetShapeFiltVolOutputGain

# SetShapeFiltVolOutputGain

设置输出增益。

## 语法

```cpp theme={null}
HRESULT SetShapeFiltVolOutputGain(  
         SHAPE_FILTVOL_CONTEXT* context,  
         float outputGain  
)  
```

### 参数

*context*   \_Inout\_\
类型:[SHAPE\_FILTVOL\_CONTEXT](https://docs.xbox.com/zh-CN/reference/audio/shapefiltvolcontext/structs/shape_filtvol_context.md)\*

指向 [SHAPE\_FILTVOL\_CONTEXT](https://docs.xbox.com/zh-CN/reference/audio/shapefiltvolcontext/structs/shape_filtvol_context.md) 对象的指针。

*outputGain*   \
类型:float

输出增益。

### 返回值

类型:HRESULT

HRESULT 成功或错误代码。

## 注解

增益和增益目标值是范围在 -2.0 到 2.0 之间的幅度值,负值表示信号反相。

| 值 | 说明 |
| :- | :- |
| 1.0 到 2.0 | 放大 |
| 1.0 | 单位增益 |
| 0.0 到 1.0 | 增益衰减 |
| 0.0 | 静音 |
| -1.0 到 0.0 | 增益衰减;信号反相 |
| -1.0 | 单位增益;信号反相 |
| -2.0 到 -1.0 | 放大;信号反相 |

若要获取当前的输出增益,请使用 [GetShapeFiltVolOutputGain](https://docs.xbox.com/zh-CN/reference/audio/shapefiltvolcontext/functions/getshapefiltvoloutputgain.md)。

有关详细信息,请参阅 [SHAPE 概述](https://docs.xbox.com/zh-CN/build/console-features/audio/overviews/shape-overview.md) 的 [滤波器/音量模块 (FLTVOL)](https://docs.xbox.com/zh-CN/build/console-features/audio/overviews/shape-overview.md#ID4EBH) 部分。

## 要求

**头文件:** shapefiltvolcontext.h

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

## 另请参阅

[SetShapeFiltVolOutputGainTarget](https://docs.xbox.com/zh-CN/reference/audio/shapefiltvolcontext/functions/setshapefiltvoloutputgaintarget.md)\
[ShapeFiltVolContext](https://docs.xbox.com/zh-CN/reference/audio/shapefiltvolcontext/shapefiltvolcontext_members.md)


## Related topics

- [SetShapeFiltVolOutputGainTarget](https://docs.xbox.com/zh-CN/reference/audio/shapefiltvolcontext/functions/setshapefiltvoloutputgaintarget.md)
- [GetShapeFiltVolOutputGain](https://docs.xbox.com/zh-CN/reference/audio/shapefiltvolcontext/functions/getshapefiltvoloutputgain.md)
- [ShapeFiltVolContext](https://docs.xbox.com/zh-CN/reference/audio/shapefiltvolcontext/shapefiltvolcontext_members.md)
- [GetShapeFiltVolOutputGainTarget](https://docs.xbox.com/zh-CN/reference/audio/shapefiltvolcontext/functions/getshapefiltvoloutputgaintarget.md)
- [SetShapeFiltVolCommand](https://docs.xbox.com/zh-CN/reference/audio/shapeflowgraph/functions/setshapefiltvolcommand.md)
