aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-07-14 09:15:12 -0700
committerChris Robinson <[email protected]>2014-07-14 09:15:12 -0700
commit0d3b18b17dc00ea996eda1adfb8921605c81d4a0 (patch)
tree85b4ebaf7f8cddbf8e21fb6c5d11583d93e4263d /Alc
parentf4cdecebcf043758d51885fdb0f84497476b6d96 (diff)
Fix omni-directional moving HRTF coeffs
Diffstat (limited to 'Alc')
-rw-r--r--Alc/hrtf.c8
1 files 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);