From b8b7c21583c156d5f5779b67593e554591c891bc Mon Sep 17 00:00:00 2001 From: Marcel Admiraal Date: Fri, 17 Jun 2022 17:36:11 +0100 Subject: [PATCH] Ensure AudioFrame variables l and r are always initialised (cherry picked from commit d3f099457226ab833127ca66f5876855a9f2da0f) --- core/math/audio_frame.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/math/audio_frame.h b/core/math/audio_frame.h index 5a7bbb4a9b4..d8151ecbfd5 100644 --- a/core/math/audio_frame.h +++ b/core/math/audio_frame.h @@ -52,7 +52,7 @@ static const float AUDIO_MIN_PEAK_DB = -200.0f; // linear2db(AUDIO_PEAK_OFFSET) struct AudioFrame { //left and right samples - float l, r; + float l = 0.f, r = 0.f; _ALWAYS_INLINE_ const float &operator[](int idx) const { return idx == 0 ? l : r; } _ALWAYS_INLINE_ float &operator[](int idx) { return idx == 0 ? l : r; }