aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 177509b6..0c930a29 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -352,25 +352,20 @@ void aluSelectPostProcess(ALCdevice *device)
*/
void BsincPrepare(const ALuint increment, BsincState *state, const BSincTable *table)
{
- ALfloat sf;
- ALsizei si;
+ ALfloat sf = 0.0f;
+ ALsizei si = BSINC_SCALE_COUNT-1;
if(increment > FRACTIONONE)
{
sf = (ALfloat)FRACTIONONE / increment;
sf = maxf(0.0f, (BSINC_SCALE_COUNT-1) * (sf-table->scaleBase) * table->scaleRange);
- si = fastf2i(sf);
+ si = float2int(sf);
/* The interpolation factor is fit to this diagonally-symmetric curve
* to reduce the transition ripple caused by interpolating different
* scales of the sinc function.
*/
sf = 1.0f - cosf(asinf(sf - si));
}
- else
- {
- sf = 0.0f;
- si = BSINC_SCALE_COUNT - 1;
- }
state->sf = sf;
state->m = table->m[si];