summaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 0262ca1c..94b3a9a6 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -641,7 +641,7 @@ static ALvoid CalcSourceParams(ALCcontext *ALContext, ALsource *ALSource,
static __inline ALshort lerp(ALshort val1, ALshort val2, ALint frac)
{
- return (val1*((1<<FRACTIONBITS)-frac) + val2*frac) >> FRACTIONBITS;
+ return val1 + (((val2-val1)*frac)>>FRACTIONBITS);
}
ALvoid aluMixData(ALCcontext *ALContext,ALvoid *buffer,ALsizei size,ALenum format)