diff options
author | Chris Robinson <[email protected]> | 2009-10-20 13:47:55 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-10-20 13:47:55 -0700 |
commit | 75b65ab2a29aa10a054974f443cc94ccf5e70f3e (patch) | |
tree | 73d56d2f93f6f32ce93ae34dc12186aa389df84d /Alc/alcEcho.c | |
parent | eca8825ab4dad656dfbc92617688afc8f10ad653 (diff) |
Remove the Frequency field from the context
Diffstat (limited to 'Alc/alcEcho.c')
-rw-r--r-- | Alc/alcEcho.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Alc/alcEcho.c b/Alc/alcEcho.c index 6601051d..431fa08e 100644 --- a/Alc/alcEcho.c +++ b/Alc/alcEcho.c @@ -118,10 +118,11 @@ ALboolean EchoDeviceUpdate(ALeffectState *effect, ALCdevice *Device) ALvoid EchoUpdate(ALeffectState *effect, ALCcontext *Context, const ALeffect *Effect) { ALechoState *state = (ALechoState*)effect; + ALuint frequency = Context->Device->Frequency; ALfloat lrpan, cw, a, g; - state->Tap[0].delay = (ALuint)(Effect->Echo.Delay * Context->Frequency); - state->Tap[1].delay = (ALuint)(Effect->Echo.LRDelay * Context->Frequency); + state->Tap[0].delay = (ALuint)(Effect->Echo.Delay * frequency); + state->Tap[1].delay = (ALuint)(Effect->Echo.LRDelay * frequency); state->Tap[1].delay += state->Tap[0].delay; lrpan = Effect->Echo.Spread*0.5f + 0.5f; @@ -130,7 +131,7 @@ ALvoid EchoUpdate(ALeffectState *effect, ALCcontext *Context, const ALeffect *Ef state->FeedGain = Effect->Echo.Feedback; - cw = cos(2.0*M_PI * LOWPASSFREQCUTOFF / Context->Frequency); + cw = cos(2.0*M_PI * LOWPASSFREQCUTOFF / frequency); g = 1.0f - Effect->Echo.Damping; a = 0.0f; if(g < 0.9999f) // 1-epsilon |