AudioEffect
继承: Resource
< RefCounted
< Object
派生: AudioEffectAmplify
, AudioEffectCapture
, AudioEffectChorus
, AudioEffectCompressor
, AudioEffectDelay
, AudioEffectDistortion
, AudioEffectEQ
, AudioEffectFilter
, AudioEffectHardLimiter
, AudioEffectLimiter
, AudioEffectPanner
, AudioEffectPhaser
, AudioEffectPitchShift
, AudioEffectRecord
, AudioEffectReverb
, AudioEffectSpectrumAnalyzer
, AudioEffectStereoEnhance
Base class for audio effect resources.
描述
The base Resource
for every audio effect. In the editor, an audio effect can be added to the current bus layout through the Audio panel. At run-time, it is also possible to manipulate audio effects through AudioServer.add_bus_effect
, AudioServer.remove_bus_effect
, and AudioServer.get_bus_effect
.
When applied on a bus, an audio effect creates a corresponding AudioEffectInstance
. The instance is directly responsible for manipulating the sound, based on the original audio effect's properties.
方法
AudioEffectInstance | _instantiate ( ) virtual1 |
方法说明
AudioEffectInstance
_instantiate ( ) virtual1
Override this method to customize the AudioEffectInstance
created when this effect is applied on a bus in the editor's Audio panel, or through AudioServer.add_bus_effect
.
extends AudioEffect
@export var strength = 4.0
func _instantiate():
var effect = CustomAudioEffectInstance.new()
effect.base = self
return effect
Note: It is recommended to keep a reference to the original AudioEffect in the new instance. Depending on the implementation this allows the effect instance to listen for changes at run-time and be modified accordingly.
本方法通常需要用户覆盖才能生效。
本方法无副作用,不会修改该实例的任何成员变量。
本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。
本方法用于构造某个类型。
调用本方法无需实例,可直接使用类名进行调用。
本方法描述的是使用本类型作为左操作数的有效运算符。
这个值是由下列位标志构成位掩码的整数。
无返回值。