1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Simplify GDVIRTUAL_REQUIRED_CALL calls

This commit is contained in:
kobewi
2022-11-30 16:40:50 +01:00
parent cd491c6e47
commit 9a3960daa5
8 changed files with 124 additions and 233 deletions

View File

@@ -31,9 +31,7 @@
#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;
}
GDVIRTUAL_REQUIRED_CALL(_process, p_src_frames, p_dst_frames, p_frame_count);
}
bool AudioEffectInstance::process_silence() const {
bool ret = false;
@@ -50,10 +48,8 @@ void AudioEffectInstance::_bind_methods() {
Ref<AudioEffectInstance> AudioEffect::instantiate() {
Ref<AudioEffectInstance> ret;
if (GDVIRTUAL_REQUIRED_CALL(_instantiate, ret)) {
return ret;
}
return Ref<AudioEffectInstance>();
GDVIRTUAL_REQUIRED_CALL(_instantiate, ret);
return ret;
}
void AudioEffect::_bind_methods() {
GDVIRTUAL_BIND(_instantiate);