aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/effects')
-rw-r--r--Alc/effects/chorus.c5
-rw-r--r--Alc/effects/flanger.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/Alc/effects/chorus.c b/Alc/effects/chorus.c
index 21db73f6..62f2e531 100644
--- a/Alc/effects/chorus.c
+++ b/Alc/effects/chorus.c
@@ -165,7 +165,10 @@ static ALvoid ALchorusState_update(ALchorusState *state, const ALCdevice *Device
}
/* Calculate lfo phase displacement */
- state->lfo_disp = fastf2i(state->lfo_range * (phase/360.0f));
+ if(phase >= 0)
+ state->lfo_disp = fastf2i(state->lfo_range * (phase/360.0f));
+ else
+ state->lfo_disp = fastf2i(state->lfo_range * ((360+phase)/360.0f));
}
}
diff --git a/Alc/effects/flanger.c b/Alc/effects/flanger.c
index 5593d549..d330511a 100644
--- a/Alc/effects/flanger.c
+++ b/Alc/effects/flanger.c
@@ -165,7 +165,10 @@ static ALvoid ALflangerState_update(ALflangerState *state, const ALCdevice *Devi
}
/* Calculate lfo phase displacement */
- state->lfo_disp = fastf2i(state->lfo_range * (phase/360.0f));
+ if(phase >= 0)
+ state->lfo_disp = fastf2i(state->lfo_range * (phase/360.0f));
+ else
+ state->lfo_disp = fastf2i(state->lfo_range * ((360+phase)/360.0f));
}
}