diff options
Diffstat (limited to 'servers/audio/effects/audio_effect_stereo_enhance.cpp')
-rw-r--r-- | servers/audio/effects/audio_effect_stereo_enhance.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/servers/audio/effects/audio_effect_stereo_enhance.cpp b/servers/audio/effects/audio_effect_stereo_enhance.cpp index a10aca02b2..6593e712a8 100644 --- a/servers/audio/effects/audio_effect_stereo_enhance.cpp +++ b/servers/audio/effects/audio_effect_stereo_enhance.cpp @@ -31,14 +31,12 @@ #include "audio_effect_stereo_enhance.h" #include "servers/audio_server.h" void AudioEffectStereoEnhanceInstance::process(const AudioFrame *p_src_frames, AudioFrame *p_dst_frames, int p_frame_count) { - float intensity = base->pan_pullout; bool surround_mode = base->surround > 0; float surround_amount = base->surround; unsigned int delay_frames = (base->time_pullout / 1000.0) * AudioServer::get_singleton()->get_mix_rate(); for (int i = 0; i < p_frame_count; i++) { - float l = p_src_frames[i].l; float r = p_src_frames[i].r; @@ -48,7 +46,6 @@ void AudioEffectStereoEnhanceInstance::process(const AudioFrame *p_src_frames, A r = (center + (r - center) * intensity); if (surround_mode) { - float val = (l + r) / 2.0; delay_ringbuff[ringbuff_pos & ringbuff_mask] = val; @@ -58,7 +55,6 @@ void AudioEffectStereoEnhanceInstance::process(const AudioFrame *p_src_frames, A l += out; r += -out; } else { - float val = r; delay_ringbuff[ringbuff_pos & ringbuff_mask] = val; @@ -75,7 +71,6 @@ void AudioEffectStereoEnhanceInstance::process(const AudioFrame *p_src_frames, A } AudioEffectStereoEnhanceInstance::~AudioEffectStereoEnhanceInstance() { - memdelete_arr(delay_ringbuff); } @@ -108,35 +103,28 @@ Ref<AudioEffectInstance> AudioEffectStereoEnhance::instance() { } void AudioEffectStereoEnhance::set_pan_pullout(float p_amount) { - pan_pullout = p_amount; } float AudioEffectStereoEnhance::get_pan_pullout() const { - return pan_pullout; } void AudioEffectStereoEnhance::set_time_pullout(float p_amount) { - time_pullout = p_amount; } float AudioEffectStereoEnhance::get_time_pullout() const { - return time_pullout; } void AudioEffectStereoEnhance::set_surround(float p_amount) { - surround = p_amount; } float AudioEffectStereoEnhance::get_surround() const { - return surround; } void AudioEffectStereoEnhance::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_pan_pullout", "amount"), &AudioEffectStereoEnhance::set_pan_pullout); ClassDB::bind_method(D_METHOD("get_pan_pullout"), &AudioEffectStereoEnhance::get_pan_pullout); |