Merge pull request #62156 from madmiraal/fix-61457

Ensure AudioFrame variables l and r are always initialised
This commit is contained in:
Rémi Verschelde 2022-06-17 22:38:57 +02:00 committed by GitHub
commit d572d3d2ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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; }