From 47f628a013e501b9eefb7ed8d5b23862bc5083ea Mon Sep 17 00:00:00 2001 From: Martin Dahlgren Date: Mon, 20 May 2019 23:51:01 +0200 Subject: [PATCH] Fix getting max magnitude in AudioEffectSpectrumAnalyzer --- servers/audio/effects/audio_effect_spectrum_analyzer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/audio/effects/audio_effect_spectrum_analyzer.cpp b/servers/audio/effects/audio_effect_spectrum_analyzer.cpp index 05cba416be1..8e15e9288fd 100644 --- a/servers/audio/effects/audio_effect_spectrum_analyzer.cpp +++ b/servers/audio/effects/audio_effect_spectrum_analyzer.cpp @@ -170,7 +170,7 @@ Vector2 AudioEffectSpectrumAnalyzerInstance::get_magnitude_for_frequency_range(f for (int i = begin_pos; i <= end_pos; i++) { max.x = MAX(max.x, r[i].l); - max.y = MAX(max.x, r[i].r); + max.y = MAX(max.y, r[i].r); } return max;