diff options
author | Chris Robinson <[email protected]> | 2014-07-14 09:15:12 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-07-14 09:15:12 -0700 |
commit | 0d3b18b17dc00ea996eda1adfb8921605c81d4a0 (patch) | |
tree | 85b4ebaf7f8cddbf8e21fb6c5d11583d93e4263d | |
parent | f4cdecebcf043758d51885fdb0f84497476b6d96 (diff) |
Fix omni-directional moving HRTF coeffs
-rw-r--r-- | Alc/hrtf.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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); |