diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-14 13:23:58 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-14 16:54:55 +0200 |
commit | 0be6d925dc3c6413bce7a3ccb49631b8e4a6e67a (patch) | |
tree | a27e497da7104dd0a64f98a04fa3067668735e91 /servers/audio/effects/audio_effect_spectrum_analyzer.cpp | |
parent | 710b34b70227becdc652b4ae027fe0ac47409642 (diff) | |
download | redot-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_spectrum_analyzer.cpp')
-rw-r--r-- | servers/audio/effects/audio_effect_spectrum_analyzer.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/servers/audio/effects/audio_effect_spectrum_analyzer.cpp b/servers/audio/effects/audio_effect_spectrum_analyzer.cpp index 680ef567fd..69337a49c8 100644 --- a/servers/audio/effects/audio_effect_spectrum_analyzer.cpp +++ b/servers/audio/effects/audio_effect_spectrum_analyzer.cpp @@ -97,7 +97,6 @@ static void smbFft(float *fftBuffer, long fftFrameSize, long sign) } } void AudioEffectSpectrumAnalyzerInstance::process(const AudioFrame *p_src_frames, AudioFrame *p_dst_frames, int p_frame_count) { - uint64_t time = OS::get_singleton()->get_ticks_usec(); //copy everything over first, since this only really does capture @@ -149,14 +148,12 @@ void AudioEffectSpectrumAnalyzerInstance::process(const AudioFrame *p_src_frames } void AudioEffectSpectrumAnalyzerInstance::_bind_methods() { - ClassDB::bind_method(D_METHOD("get_magnitude_for_frequency_range", "from_hz", "to_hz", "mode"), &AudioEffectSpectrumAnalyzerInstance::get_magnitude_for_frequency_range, DEFVAL(MAGNITUDE_MAX)); BIND_ENUM_CONSTANT(MAGNITUDE_AVERAGE); BIND_ENUM_CONSTANT(MAGNITUDE_MAX); } Vector2 AudioEffectSpectrumAnalyzerInstance::get_magnitude_for_frequency_range(float p_begin, float p_end, MagnitudeMode p_mode) const { - if (last_fft_time == 0) { return Vector2(); } @@ -197,7 +194,6 @@ Vector2 AudioEffectSpectrumAnalyzerInstance::get_magnitude_for_frequency_range(f return avg; } else { - Vector2 max; for (int i = begin_pos; i <= end_pos; i++) { @@ -210,7 +206,6 @@ Vector2 AudioEffectSpectrumAnalyzerInstance::get_magnitude_for_frequency_range(f } Ref<AudioEffectInstance> AudioEffectSpectrumAnalyzer::instance() { - Ref<AudioEffectSpectrumAnalyzerInstance> ins; ins.instance(); ins->base = Ref<AudioEffectSpectrumAnalyzer>(this); @@ -237,7 +232,6 @@ void AudioEffectSpectrumAnalyzer::set_buffer_length(float p_seconds) { } float AudioEffectSpectrumAnalyzer::get_buffer_length() const { - return buffer_length; } @@ -259,7 +253,6 @@ AudioEffectSpectrumAnalyzer::FFT_Size AudioEffectSpectrumAnalyzer::get_fft_size( } void AudioEffectSpectrumAnalyzer::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_buffer_length", "seconds"), &AudioEffectSpectrumAnalyzer::set_buffer_length); ClassDB::bind_method(D_METHOD("get_buffer_length"), &AudioEffectSpectrumAnalyzer::get_buffer_length); |