diff options
author | Chris Robinson <[email protected]> | 2020-10-21 17:16:27 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-10-21 17:16:27 -0700 |
commit | 7bb37deb51c6c1d0faa4f2fbe92f8051e64d6401 (patch) | |
tree | e1a8cf7da46d8816ee0e1a3ff6151206735bc981 /alc/alu.h | |
parent | 3e62600ecc3c2f1be4da0d3e8166f5c67cc25fed (diff) |
Replace the mixer fraction macros with constexpr variables
Diffstat (limited to 'alc/alu.h')
-rw-r--r-- | alc/alu.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -36,9 +36,10 @@ constexpr float AirAbsorbGainHF{0.99426f}; /* -0.05dB */ /** Target gain for the reverb decay feedback reaching the decay time. */ constexpr float ReverbDecayGain{0.001f}; /* -60 dB */ -#define FRACTIONBITS 12 -#define FRACTIONONE (1<<FRACTIONBITS) -#define FRACTIONMASK (FRACTIONONE-1) + +constexpr int MixerFracBits{12}; +constexpr int MixerFracOne{1 << MixerFracBits}; +constexpr int MixerFracMask{MixerFracOne - 1}; inline float lerp(float val1, float val2, float mu) noexcept |