AudioEffectSpectrumAnalyzerInstance
继承: AudioEffectInstance
< RefCounted
< Object
Queryable instance of an AudioEffectSpectrumAnalyzer
.
描述
The runtime part of an AudioEffectSpectrumAnalyzer
, which can be used to query the magnitude of a frequency range on its host bus.
An instance of this class can be acquired with AudioServer.get_bus_effect_instance
.
方法
Vector2 | get_magnitude_for_frequency_range ( from_hz: float , to_hz: float , mode: MagnitudeMode = 1 ) const1 |
枚举
enum MagnitudeMode:
MagnitudeMode MAGNITUDE_AVERAGE = 0
Use the average value across the frequency range as magnitude.
MagnitudeMode MAGNITUDE_MAX = 1
Use the maximum value of the frequency range as magnitude.
方法说明
Vector2
get_magnitude_for_frequency_range ( from_hz: float
, to_hz: float
, mode: MagnitudeMode = 1 ) const1
Returns the magnitude of the frequencies from from_hz
to to_hz
in linear energy as a Vector2. The x
component of the return value represents the left stereo channel, and y
represents the right channel.
mode
determines how the frequency range will be processed. See MagnitudeMode.
本方法通常需要用户覆盖才能生效。
本方法无副作用,不会修改该实例的任何成员变量。
本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。
本方法用于构造某个类型。
调用本方法无需实例,可直接使用类名进行调用。
本方法描述的是使用本类型作为左操作数的有效运算符。
这个值是由下列位标志构成位掩码的整数。
无返回值。