From 0d3b18b17dc00ea996eda1adfb8921605c81d4a0 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 14 Jul 2014 09:15:12 -0700 Subject: Fix omni-directional moving HRTF coeffs --- Alc/hrtf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Alc/hrtf.c b/Alc/hrtf.c index fdd3259d..8737e7e3 100644 --- a/Alc/hrtf.c +++ b/Alc/hrtf.c @@ -313,10 +313,10 @@ ALuint GetMovingHrtfCoeffs(const struct Hrtf *Hrtf, ALfloat elevation, ALfloat a c = (Hrtf->coeffs[lidx[0]+i]*blend[0] + Hrtf->coeffs[lidx[1]+i]*blend[1] + Hrtf->coeffs[lidx[2]+i]*blend[2] + Hrtf->coeffs[lidx[3]+i]*blend[3]); - coeffs[i][0] = lerp(0.0f, c, dirfact) * gain; + coeffs[i][0] = lerp(1.0f, c, dirfact) * gain; c = (Hrtf->coeffs[ridx[0]+i]*blend[0] + Hrtf->coeffs[ridx[1]+i]*blend[1] + Hrtf->coeffs[ridx[2]+i]*blend[2] + Hrtf->coeffs[ridx[3]+i]*blend[3]); - coeffs[i][1] = lerp(0.0f, c, dirfact) * gain; + coeffs[i][1] = lerp(1.0f, c, dirfact) * gain; coeffStep[i][0] = step * (coeffs[i][0] - left); coeffStep[i][1] = step * (coeffs[i][1] - right); @@ -328,10 +328,10 @@ ALuint GetMovingHrtfCoeffs(const struct Hrtf *Hrtf, ALfloat elevation, ALfloat a c = (Hrtf->coeffs[lidx[0]+i]*blend[0] + Hrtf->coeffs[lidx[1]+i]*blend[1] + Hrtf->coeffs[lidx[2]+i]*blend[2] + Hrtf->coeffs[lidx[3]+i]*blend[3]); - coeffs[i][0] = lerp(1.0f, c, dirfact) * gain; + coeffs[i][0] = lerp(0.0f, c, dirfact) * gain; c = (Hrtf->coeffs[ridx[0]+i]*blend[0] + Hrtf->coeffs[ridx[1]+i]*blend[1] + Hrtf->coeffs[ridx[2]+i]*blend[2] + Hrtf->coeffs[ridx[3]+i]*blend[3]); - coeffs[i][1] = lerp(1.0f, c, dirfact) * gain; + coeffs[i][1] = lerp(0.0f, c, dirfact) * gain; coeffStep[i][0] = step * (coeffs[i][0] - left); coeffStep[i][1] = step * (coeffs[i][1] - right); -- cgit v1.2.3