diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-02-03 10:05:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-03 10:05:34 +0100 |
commit | 3a3af0279b1ed7c3b40136cdd7db1f54e09b88e2 (patch) | |
tree | 4525b1babec36496d19b44f9ef6c2cb217956d3c /core/math | |
parent | 0f327f0d65384d635ca9137bd9c7983936027296 (diff) | |
parent | a2b3a73e2d0c2b9e9badeab28fef26565a9ec3f2 (diff) |
Merge pull request #45658 from RandomShaper/fix_frozen_peak
Make audio bus channels' peak volume consistent
Diffstat (limited to 'core/math')
-rw-r--r-- | core/math/audio_frame.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/math/audio_frame.h b/core/math/audio_frame.h index 5773da9211..a5616b8d79 100644 --- a/core/math/audio_frame.h +++ b/core/math/audio_frame.h @@ -47,6 +47,9 @@ static inline float undenormalise(volatile float f) { return (v.i & 0x7f800000) < 0x08000000 ? 0.0f : f; } +static const float AUDIO_PEAK_OFFSET = 0.0000000001f; +static const float AUDIO_MIN_PEAK_DB = -200.0f; // linear2db(AUDIO_PEAK_OFFSET) + struct AudioFrame { //left and right samples float l, r; |