summaryrefslogtreecommitdiff
path: root/servers/audio/audio_effect.h
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-03-10 14:09:17 +0100
committerGitHub <noreply@github.com>2022-03-10 14:09:17 +0100
commit9b597364737cbc04ccb5ee8e5c18bccb4dd31362 (patch)
tree5e2cc8006e77d01596e323ad9bac586920fc080a /servers/audio/audio_effect.h
parent90faf04f293fcdf636f641bfe3d88c5857695d9b (diff)
parent6f51eca1e3045571ccc68414a922e8b0229111f0 (diff)
Merge pull request #58972 from reduz/expose-more-gdextension
Diffstat (limited to 'servers/audio/audio_effect.h')
-rw-r--r--servers/audio/audio_effect.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/servers/audio/audio_effect.h b/servers/audio/audio_effect.h
index 00a5d6c004..3a0578679d 100644
--- a/servers/audio/audio_effect.h
+++ b/servers/audio/audio_effect.h
@@ -33,20 +33,32 @@
#include "core/io/resource.h"
#include "core/math/audio_frame.h"
+#include "core/object/gdvirtual.gen.inc"
+#include "core/object/script_language.h"
+#include "core/variant/native_ptr.h"
class AudioEffectInstance : public RefCounted {
GDCLASS(AudioEffectInstance, RefCounted);
+protected:
+ GDVIRTUAL3(_process, GDNativeConstPtr<AudioFrame>, GDNativePtr<AudioFrame>, int)
+ GDVIRTUAL0RC(bool, _process_silence)
+ static void _bind_methods();
+
public:
- virtual void process(const AudioFrame *p_src_frames, AudioFrame *p_dst_frames, int p_frame_count) = 0;
- virtual bool process_silence() const { return false; }
+ virtual void process(const AudioFrame *p_src_frames, AudioFrame *p_dst_frames, int p_frame_count);
+ virtual bool process_silence() const;
};
class AudioEffect : public Resource {
GDCLASS(AudioEffect, Resource);
+protected:
+ GDVIRTUAL0R(Ref<AudioEffectInstance>, _instantiate)
+ static void _bind_methods();
+
public:
- virtual Ref<AudioEffectInstance> instantiate() = 0;
+ virtual Ref<AudioEffectInstance> instantiate();
AudioEffect();
};