diff options
author | Chris Robinson <[email protected]> | 2018-05-12 21:36:23 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-05-12 21:36:23 -0700 |
commit | dd055fc8586a7409ba52ca399370a8bad7d99c64 (patch) | |
tree | 1e70f45cbf150764c4e62a7036d445c17fb61ebc | |
parent | 5c0673049c0b4ebf3ac15c834e8d222d8c7ae5a2 (diff) |
Use fastf2i instead of manually rounding with float2int
-rw-r--r-- | Alc/hrtf.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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. */ |