summaryrefslogtreecommitdiffstats
path: root/servers/audio/effects/audio_effect_phaser.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-05-14 13:23:58 +0200
committerRémi Verschelde <rverschelde@gmail.com>2020-05-14 16:54:55 +0200
commit0be6d925dc3c6413bce7a3ccb49631b8e4a6e67a (patch)
treea27e497da7104dd0a64f98a04fa3067668735e91 /servers/audio/effects/audio_effect_phaser.cpp
parent710b34b70227becdc652b4ae027fe0ac47409642 (diff)
downloadredot-engine-0be6d925dc3c6413bce7a3ccb49631b8e4a6e67a.tar.gz
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
Diffstat (limited to 'servers/audio/effects/audio_effect_phaser.cpp')
-rw-r--r--servers/audio/effects/audio_effect_phaser.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/servers/audio/effects/audio_effect_phaser.cpp b/servers/audio/effects/audio_effect_phaser.cpp
index 3709b69d45..0d3d2f74a5 100644
--- a/servers/audio/effects/audio_effect_phaser.cpp
+++ b/servers/audio/effects/audio_effect_phaser.cpp
@@ -33,7 +33,6 @@
#include "servers/audio_server.h"
void AudioEffectPhaserInstance::process(const AudioFrame *p_src_frames, AudioFrame *p_dst_frames, int p_frame_count) {
-
float sampling_rate = AudioServer::get_singleton()->get_mix_rate();
float dmin = base->range_min / (sampling_rate / 2.0);
@@ -42,7 +41,6 @@ void AudioEffectPhaserInstance::process(const AudioFrame *p_src_frames, AudioFra
float increment = 2.f * Math_PI * (base->rate / sampling_rate);
for (int i = 0; i < p_frame_count; i++) {
-
phase += increment;
while (phase >= Math_PI * 2.f) {
@@ -91,54 +89,43 @@ Ref<AudioEffectInstance> AudioEffectPhaser::instance() {
}
void AudioEffectPhaser::set_range_min_hz(float p_hz) {
-
range_min = p_hz;
}
float AudioEffectPhaser::get_range_min_hz() const {
-
return range_min;
}
void AudioEffectPhaser::set_range_max_hz(float p_hz) {
-
range_max = p_hz;
}
float AudioEffectPhaser::get_range_max_hz() const {
-
return range_max;
}
void AudioEffectPhaser::set_rate_hz(float p_hz) {
-
rate = p_hz;
}
float AudioEffectPhaser::get_rate_hz() const {
-
return rate;
}
void AudioEffectPhaser::set_feedback(float p_fbk) {
-
feedback = p_fbk;
}
float AudioEffectPhaser::get_feedback() const {
-
return feedback;
}
void AudioEffectPhaser::set_depth(float p_depth) {
-
depth = p_depth;
}
float AudioEffectPhaser::get_depth() const {
-
return depth;
}
void AudioEffectPhaser::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("set_range_min_hz", "hz"), &AudioEffectPhaser::set_range_min_hz);
ClassDB::bind_method(D_METHOD("get_range_min_hz"), &AudioEffectPhaser::get_range_min_hz);