diff options
author | Chris Robinson <[email protected]> | 2017-05-09 11:50:25 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-05-09 11:56:03 -0700 |
commit | a2c25378a970792461c961054e2b47cd3a086e05 (patch) | |
tree | 58faea77675124e906d5059a5e833f86c821cee4 /OpenAL32 | |
parent | 4a4442ad91d34964b1d695381fafbdef07bb14ce (diff) |
Reduce LIMITER_VALUE_MAX
The previous value couldn't actually be expressed as a float and got rounded up
to the next whole number value, leaving the potential for an overrun in the
squared sum.
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/Include/alu.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h index 8ac25e35..30b245a5 100644 --- a/OpenAL32/Include/alu.h +++ b/OpenAL32/Include/alu.h @@ -299,7 +299,7 @@ void DeinitVoice(ALvoice *voice); #define LIMITER_WINDOW_SIZE (1<<7) /* 128 */ #define LIMITER_WINDOW_MASK (LIMITER_WINDOW_SIZE-1) -#define LIMITER_VALUE_MAX (UINT_MAX / LIMITER_WINDOW_SIZE) +#define LIMITER_VALUE_MAX (1<<24) /* 16777216 */ struct OutputLimiter { /* RMS detection window, sum of values in the window, and the next write * pos. Values are 16.16 fixed-point. |