Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

AudioEffectEQ

继承: AudioEffect < Resource < RefCounted < Object

派生: AudioEffectEQ10, AudioEffectEQ21, AudioEffectEQ6

音频均衡器(EQ)的基类。让你可以控制频率。

如果 AudioEffectEQ6AudioEffectEQ10AudioEffectEQ21 不符合你的需求,请用它来创建自定义均衡器。

描述

“均衡器”通过允许对整个频谱中各个频率进行频段的调整,从而控制它们的增益。频段是指频谱中的一个点,每个频段都意味着频谱的一个可调节部分。

使用均衡器来弥补音频中存在的不足,为其他元素腾出空间,或去除不需要的频率。AudioEffectEQ 在主总线上非常有用,可以平衡整个混音或赋予其更多特色。当游戏在移动设备上运行时,它们也很有用,可以根据那种扬声器来调整混音(插入耳机时可以禁用)。

教程

方法

int

get_band_count() const

float

get_band_gain_db(band_idx: int) const

void

set_band_gain_db(band_idx: int, volume_db: float)


方法说明

int get_band_count() const 🔗

返回均衡器的频段数。


float get_band_gain_db(band_idx: int) const 🔗

返回指定索引处的波段增益,单位为 dB。


void set_band_gain_db(band_idx: int, volume_db: float) 🔗

设置指定索引处的波段增益,单位为 dB。