diff options
author | Chris Robinson <[email protected]> | 2016-10-09 00:37:47 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-10-09 00:37:47 -0700 |
commit | 4bb6b9589f730be4068012b33f0c4323c3794816 (patch) | |
tree | 691a1f6a63e14b50e2c64d66b4865395f7292968 /Alc/ALu.c | |
parent | 698eddbb0caf6ba77d644e7de5da01ad6687ee68 (diff) |
Don't interpolate between nearest HRIRs
It still fades between HRIRs when it changes, but now it selects the nearest
one instead of blending the nearest four. Due to the minimum-phase nature of
the HRIRs, interpolating between delays lead to some oddities which are
exasperated by the fading (and the fading is needed to avoid clicks and pops,
and smooth out changes).
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r-- | Alc/ALu.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -657,7 +657,7 @@ static void CalcNonAttnSourceParams(ALvoice *voice, const struct ALsourceProps * } /* Get the static HRIR coefficients and delays for this channel. */ - GetLerpedHrtfCoeffs(Device->Hrtf.Handle, + GetHrtfCoeffs(Device->Hrtf.Handle, chans[c].elevation, chans[c].angle, 0.0f, DryGain, voice->Chan[c].Direct.Hrtf.Target.Coeffs, voice->Chan[c].Direct.Hrtf.Target.Delay @@ -1172,9 +1172,9 @@ static void CalcAttnSourceParams(ALvoice *voice, const struct ALsourceProps *pro spread = asinf(radius / Distance) * 2.0f; /* Get the HRIR coefficients and delays. */ - GetLerpedHrtfCoeffs(Device->Hrtf.Handle, ev, az, spread, DryGain, - voice->Chan[0].Direct.Hrtf.Target.Coeffs, - voice->Chan[0].Direct.Hrtf.Target.Delay); + GetHrtfCoeffs(Device->Hrtf.Handle, ev, az, spread, DryGain, + voice->Chan[0].Direct.Hrtf.Target.Coeffs, + voice->Chan[0].Direct.Hrtf.Target.Delay); CalcDirectionCoeffs(dir, spread, coeffs); |