aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-05-03 17:13:05 -0700
committerChris Robinson <[email protected]>2018-05-03 17:27:30 -0700
commitd8a659c6f2db425729a33b0649f467c14ef18a9b (patch)
treebe1074ff77c315cd00b357d547330ec9daf332cd
parentaf90d89b6bea2f5fb7dae930ed6d6e420568f2a9 (diff)
Avoid fastf2i in the converter init
-rw-r--r--Alc/converter.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Alc/converter.c b/Alc/converter.c
index 6e28b4a6..ef2eb9af 100644
--- a/Alc/converter.c
+++ b/Alc/converter.c
@@ -27,7 +27,8 @@ SampleConverter *CreateSampleConverter(enum DevFmtType srcType, enum DevFmtType
/* Have to set the mixer FPU mode since that's what the resampler code expects. */
START_MIXER_MODE();
- step = fastf2i((ALfloat)mind((ALdouble)srcRate / dstRate, MAX_PITCH)*FRACTIONONE + 0.5f);
+ step = (ALsizei)mind(((ALdouble)srcRate/dstRate*FRACTIONONE) + 0.5,
+ MAX_PITCH * FRACTIONONE);
converter->mIncrement = maxi(step, 1);
if(converter->mIncrement == FRACTIONONE)
converter->mResample = Resample_copy_C;