Explorar o código

Fix getting max magnitude in AudioEffectSpectrumAnalyzer

Martin Dahlgren %!s(int64=6) %!d(string=hai) anos
pai
achega
47f628a013
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      servers/audio/effects/audio_effect_spectrum_analyzer.cpp

+ 1 - 1
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;