aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/hrtf.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-04-24 21:42:59 -0700
committerChris Robinson <[email protected]>2016-04-24 21:42:59 -0700
commitf0871c8cfcb329e847fd48256fd32f20d2c7e827 (patch)
tree6094609d7c173efa66894705d63d1f018bbf0f63 /Alc/hrtf.c
parentfdee577940a4669e9723a16c4c625567694589ec (diff)
Improve radius behavior with scaling of ambisonic coefficients
Diffstat (limited to 'Alc/hrtf.c')
-rw-r--r--Alc/hrtf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Alc/hrtf.c b/Alc/hrtf.c
index 9549c010..1f972f87 100644
--- a/Alc/hrtf.c
+++ b/Alc/hrtf.c
@@ -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]);