diff options
author | Chris Robinson <[email protected]> | 2016-08-27 06:28:04 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-08-27 06:28:04 -0700 |
commit | 3d59021702c2f6ea4dbdf5d2f6231fd945370e27 (patch) | |
tree | 670a7c60b98e2babacf1bee060aaeba89e314b63 /OpenAL32/Include | |
parent | 4b153dade82b0558c96d54828bd2f9f86dc808fd (diff) |
Clamp the maximum mixing gain boost to 16
The combined source and listener gains now can't exceed a multiplier of 16
(~24dB). This is to avoid mixes getting out of control with large volume
boosts, which reduces the effective precision given by floating-point.
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r-- | OpenAL32/Include/alu.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h index 1d922881..70ce7059 100644 --- a/OpenAL32/Include/alu.h +++ b/OpenAL32/Include/alu.h @@ -173,6 +173,8 @@ typedef void (*HrtfDirectMixerFunc)(ALfloat (*restrict OutBuffer)[BUFFERSIZE], ALfloat (*restrict Values)[2], ALuint BufferSize); +#define GAIN_MIX_MAX (16.0f) /* +24dB */ + #define GAIN_SILENCE_THRESHOLD (0.00001f) /* -100dB */ #define SPEEDOFSOUNDMETRESPERSEC (343.3f) |