diff options
| author | Rémi Verschelde <remi@verschelde.fr> | 2022-03-10 14:09:17 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-10 14:09:17 +0100 |
| commit | 9b597364737cbc04ccb5ee8e5c18bccb4dd31362 (patch) | |
| tree | 5e2cc8006e77d01596e323ad9bac586920fc080a /servers/audio/audio_effect.cpp | |
| parent | 90faf04f293fcdf636f641bfe3d88c5857695d9b (diff) | |
| parent | 6f51eca1e3045571ccc68414a922e8b0229111f0 (diff) | |
| download | redot-engine-9b597364737cbc04ccb5ee8e5c18bccb4dd31362.tar.gz | |
Merge pull request #58972 from reduz/expose-more-gdextension
Diffstat (limited to 'servers/audio/audio_effect.cpp')
| -rw-r--r-- | servers/audio/audio_effect.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/servers/audio/audio_effect.cpp b/servers/audio/audio_effect.cpp index b9eca14a4c..f38d0adfb2 100644 --- a/servers/audio/audio_effect.cpp +++ b/servers/audio/audio_effect.cpp @@ -30,5 +30,36 @@ #include "audio_effect.h" +void AudioEffectInstance::process(const AudioFrame *p_src_frames, AudioFrame *p_dst_frames, int p_frame_count) { + if (GDVIRTUAL_REQUIRED_CALL(_process, p_src_frames, p_dst_frames, p_frame_count)) { + return; + } +} +bool AudioEffectInstance::process_silence() const { + bool ret; + if (GDVIRTUAL_CALL(_process_silence, ret)) { + return ret; + } + return false; +} + +void AudioEffectInstance::_bind_methods() { + GDVIRTUAL_BIND(_process, "src_buffer", "dst_buffer", "frame_count"); + GDVIRTUAL_BIND(_process_silence); +} + +//// + +Ref<AudioEffectInstance> AudioEffect::instantiate() { + Ref<AudioEffectInstance> ret; + if (GDVIRTUAL_REQUIRED_CALL(_instantiate, ret)) { + return ret; + } + return Ref<AudioEffectInstance>(); +} +void AudioEffect::_bind_methods() { + GDVIRTUAL_BIND(_instantiate); +} + AudioEffect::AudioEffect() { } |
