Skip to content

Commit

Permalink
Ensure AudioFrame variables l and r are always initialised
Browse files Browse the repository at this point in the history
(cherry picked from commit d3f0994)
  • Loading branch information
madmiraal authored and Riordan-DC committed Jan 23, 2023
1 parent 24f68bf commit 4a652ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/math/audio_frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down

0 comments on commit 4a652ee

Please sign in to comment.