diff options
author | Chris Robinson <[email protected]> | 2016-04-24 21:42:59 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-04-24 21:42:59 -0700 |
commit | f0871c8cfcb329e847fd48256fd32f20d2c7e827 (patch) | |
tree | 6094609d7c173efa66894705d63d1f018bbf0f63 /Alc/hrtf.c | |
parent | fdee577940a4669e9723a16c4c625567694589ec (diff) |
Improve radius behavior with scaling of ambisonic coefficients
Diffstat (limited to 'Alc/hrtf.c')
-rw-r--r-- | Alc/hrtf.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -96,12 +96,15 @@ static void CalcAzIndices(ALuint azcount, ALfloat az, ALuint *azidx, ALfloat *az * increase the apparent resolution of the HRIR data set. The coefficients * are also normalized and attenuated by the specified gain. */ -void GetLerpedHrtfCoeffs(const struct Hrtf *Hrtf, ALfloat elevation, ALfloat azimuth, ALfloat dirfact, ALfloat gain, ALfloat (*coeffs)[2], ALuint *delays) +void GetLerpedHrtfCoeffs(const struct Hrtf *Hrtf, ALfloat elevation, ALfloat azimuth, ALfloat spread, ALfloat gain, ALfloat (*coeffs)[2], ALuint *delays) { ALuint evidx[2], lidx[4], ridx[4]; ALfloat mu[3], blend[4]; + ALfloat dirfact; ALuint i; + dirfact = 1.0f - (spread / F_TAU); + /* Claculate elevation indices and interpolation factor. */ CalcEvIndices(Hrtf->evCount, elevation, evidx, &mu[2]); |