aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-05-12 21:36:23 -0700
committerChris Robinson <[email protected]>2018-05-12 21:36:23 -0700
commitdd055fc8586a7409ba52ca399370a8bad7d99c64 (patch)
tree1e70f45cbf150764c4e62a7036d445c17fb61ebc /Alc
parent5c0673049c0b4ebf3ac15c834e8d222d8c7ae5a2 (diff)
Use fastf2i instead of manually rounding with float2int
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 71ab7921..b0bd22d2 100644
--- a/Alc/hrtf.c
+++ b/Alc/hrtf.c
@@ -156,13 +156,13 @@ void GetHrtfCoeffs(const struct Hrtf *Hrtf, ALfloat elevation, ALfloat azimuth,
blend[3] = ( emu) * ( amu[1]) * dirfact;
/* Calculate the blended HRIR delays. */
- delays[0] = float2int(
+ delays[0] = fastf2i(
Hrtf->delays[idx[0]][0]*blend[0] + Hrtf->delays[idx[1]][0]*blend[1] +
- Hrtf->delays[idx[2]][0]*blend[2] + Hrtf->delays[idx[3]][0]*blend[3] + 0.5f
+ Hrtf->delays[idx[2]][0]*blend[2] + Hrtf->delays[idx[3]][0]*blend[3]
);
- delays[1] = float2int(
+ delays[1] = fastf2i(
Hrtf->delays[idx[0]][1]*blend[0] + Hrtf->delays[idx[1]][1]*blend[1] +
- Hrtf->delays[idx[2]][1]*blend[2] + Hrtf->delays[idx[3]][1]*blend[3] + 0.5f
+ Hrtf->delays[idx[2]][1]*blend[2] + Hrtf->delays[idx[3]][1]*blend[3]
);
/* Calculate the sample offsets for the HRIR indices. */