diff options
author | Chris Robinson <[email protected]> | 2017-02-19 14:36:06 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-02-19 16:45:17 -0800 |
commit | d45dd9c668b2f4331492600d8ff99dc20c068664 (patch) | |
tree | 346dc9091703a7f3c5c76b73e4dc10874b0dc814 /OpenAL32 | |
parent | 247f56249ade334f8f7ef9eda9c380af0278562f (diff) |
Remove the sinc8 resampler option
Perf shows less than 1 percent CPU difference from the higher quality bsinc
resampler, but uses almost twice as much memory (a 128KB lookup table).
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/Include/alu.h | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h index c3c7a20c..c9f8760e 100644 --- a/OpenAL32/Include/alu.h +++ b/OpenAL32/Include/alu.h @@ -229,11 +229,7 @@ inline ALuint64 clampu64(ALuint64 val, ALuint64 min, ALuint64 max) { return minu64(max, maxu64(min, val)); } -union ResamplerCoeffs { - ALfloat FIR4[FRACTIONONE][4]; - ALfloat FIR8[FRACTIONONE][8]; -}; -extern alignas(16) union ResamplerCoeffs ResampleCoeffs; +extern alignas(16) ALfloat ResampleCoeffs_FIR4[FRACTIONONE][4]; extern alignas(16) const ALfloat bsincTab[18840]; @@ -244,15 +240,9 @@ inline ALfloat lerp(ALfloat val1, ALfloat val2, ALfloat mu) } inline ALfloat resample_fir4(ALfloat val0, ALfloat val1, ALfloat val2, ALfloat val3, ALuint frac) { - const ALfloat *k = ResampleCoeffs.FIR4[frac]; + const ALfloat *k = ResampleCoeffs_FIR4[frac]; return k[0]*val0 + k[1]*val1 + k[2]*val2 + k[3]*val3; } -inline ALfloat resample_fir8(ALfloat val0, ALfloat val1, ALfloat val2, ALfloat val3, ALfloat val4, ALfloat val5, ALfloat val6, ALfloat val7, ALuint frac) -{ - const ALfloat *k = ResampleCoeffs.FIR8[frac]; - return k[0]*val0 + k[1]*val1 + k[2]*val2 + k[3]*val3 + - k[4]*val4 + k[5]*val5 + k[6]*val6 + k[7]*val7; -} enum HrtfRequestMode { |