aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alcModulator.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-09-29 06:55:00 -0700
committerChris Robinson <[email protected]>2011-09-29 06:55:00 -0700
commit9e2600cac4accf671382dad3add9ec1bad5bb2ca (patch)
treef32a63c941b3bf812f430db80f6f5c1366ef5b9b /Alc/alcModulator.c
parent3c27c24dec5cc6830a53b098d8e94cb3d28b4aeb (diff)
Use fast float-to-int conversions for some mixer-related code
Diffstat (limited to 'Alc/alcModulator.c')
-rw-r--r--Alc/alcModulator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Alc/alcModulator.c b/Alc/alcModulator.c
index ed8d151e..d955f103 100644
--- a/Alc/alcModulator.c
+++ b/Alc/alcModulator.c
@@ -147,8 +147,8 @@ static ALvoid ModulatorUpdate(ALeffectState *effect, ALCcontext *Context, const
else if(Slot->effect.Modulator.Waveform == AL_RING_MODULATOR_SQUARE)
state->Waveform = SQUARE;
- state->step = (ALuint)(Slot->effect.Modulator.Frequency*WAVEFORM_FRACONE /
- Device->Frequency);
+ state->step = fastf2u(Slot->effect.Modulator.Frequency*WAVEFORM_FRACONE /
+ Device->Frequency);
if(state->step == 0) state->step = 1;
cw = aluCos(F_PI*2.0f * Slot->effect.Modulator.HighPassCutoff /