aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alcEcho.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-07-16 03:02:16 -0700
committerChris Robinson <[email protected]>2011-07-16 03:02:16 -0700
commit3bd7256dc826f21b30e90c9d761e8d5639700afe (patch)
tree275acee6c06705b4504dfd797fc073430e6626e3 /Alc/alcEcho.c
parentda2429a1d0ad184abe24f61aa7e064b81026651c (diff)
Pass the effect slot to the effect update method
Diffstat (limited to 'Alc/alcEcho.c')
-rw-r--r--Alc/alcEcho.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Alc/alcEcho.c b/Alc/alcEcho.c
index c47063bb..f60290f9 100644
--- a/Alc/alcEcho.c
+++ b/Alc/alcEcho.c
@@ -101,24 +101,24 @@ static ALboolean EchoDeviceUpdate(ALeffectState *effect, ALCdevice *Device)
return AL_TRUE;
}
-static ALvoid EchoUpdate(ALeffectState *effect, ALCcontext *Context, const ALeffect *Effect)
+static ALvoid EchoUpdate(ALeffectState *effect, ALCcontext *Context, const ALeffectslot *Slot)
{
ALechoState *state = (ALechoState*)effect;
ALuint frequency = Context->Device->Frequency;
ALfloat lrpan, cw, g;
- state->Tap[0].delay = (ALuint)(Effect->Params.Echo.Delay * frequency) + 1;
- state->Tap[1].delay = (ALuint)(Effect->Params.Echo.LRDelay * frequency);
+ state->Tap[0].delay = (ALuint)(Slot->effect.Params.Echo.Delay * frequency) + 1;
+ state->Tap[1].delay = (ALuint)(Slot->effect.Params.Echo.LRDelay * frequency);
state->Tap[1].delay += state->Tap[0].delay;
- lrpan = Effect->Params.Echo.Spread*0.5f + 0.5f;
+ lrpan = Slot->effect.Params.Echo.Spread*0.5f + 0.5f;
state->GainL = aluSqrt( lrpan);
state->GainR = aluSqrt(1.0f-lrpan);
- state->FeedGain = Effect->Params.Echo.Feedback;
+ state->FeedGain = Slot->effect.Params.Echo.Feedback;
cw = cos(2.0*M_PI * LOWPASSFREQCUTOFF / frequency);
- g = 1.0f - Effect->Params.Echo.Damping;
+ g = 1.0f - Slot->effect.Params.Echo.Damping;
state->iirFilter.coeff = lpCoeffCalc(g, cw);
}