summaryrefslogtreecommitdiff
path: root/servers/audio/effects/audio_effect_limiter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'servers/audio/effects/audio_effect_limiter.cpp')
-rw-r--r--servers/audio/effects/audio_effect_limiter.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/servers/audio/effects/audio_effect_limiter.cpp b/servers/audio/effects/audio_effect_limiter.cpp
index 40a4243168..27f1aaf71f 100644
--- a/servers/audio/effects/audio_effect_limiter.cpp
+++ b/servers/audio/effects/audio_effect_limiter.cpp
@@ -31,7 +31,6 @@
#include "audio_effect_limiter.h"
void AudioEffectLimiterInstance::process(const AudioFrame *p_src_frames, AudioFrame *p_dst_frames, int p_frame_count) {
-
float threshdb = base->threshold;
float ceiling = Math::db2linear(base->ceiling);
float ceildb = base->ceiling;
@@ -42,7 +41,6 @@ void AudioEffectLimiterInstance::process(const AudioFrame *p_src_frames, AudioFr
float scmult = Math::abs((ceildb - sc) / (peakdb - sc));
for (int i = 0; i < p_frame_count; i++) {
-
float spl0 = p_src_frames[i].l;
float spl1 = p_src_frames[i].r;
spl0 = spl0 * makeup;
@@ -78,44 +76,38 @@ Ref<AudioEffectInstance> AudioEffectLimiter::instance() {
}
void AudioEffectLimiter::set_threshold_db(float p_threshold) {
-
threshold = p_threshold;
}
float AudioEffectLimiter::get_threshold_db() const {
-
return threshold;
}
void AudioEffectLimiter::set_ceiling_db(float p_ceiling) {
-
ceiling = p_ceiling;
}
-float AudioEffectLimiter::get_ceiling_db() const {
+float AudioEffectLimiter::get_ceiling_db() const {
return ceiling;
}
void AudioEffectLimiter::set_soft_clip_db(float p_soft_clip) {
-
soft_clip = p_soft_clip;
}
-float AudioEffectLimiter::get_soft_clip_db() const {
+float AudioEffectLimiter::get_soft_clip_db() const {
return soft_clip;
}
void AudioEffectLimiter::set_soft_clip_ratio(float p_soft_clip) {
-
soft_clip_ratio = p_soft_clip;
}
-float AudioEffectLimiter::get_soft_clip_ratio() const {
+float AudioEffectLimiter::get_soft_clip_ratio() const {
return soft_clip_ratio;
}
void AudioEffectLimiter::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("set_ceiling_db", "ceiling"), &AudioEffectLimiter::set_ceiling_db);
ClassDB::bind_method(D_METHOD("get_ceiling_db"), &AudioEffectLimiter::get_ceiling_db);