diff options
author | Chris Robinson <[email protected]> | 2012-04-28 08:24:09 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2012-04-28 08:24:09 -0700 |
commit | c34d78f41718f859709700b06bdfdf6640890275 (patch) | |
tree | 92e99f74a80855d3f06ad16388be8f30ec482371 /Alc/alcDedicated.c | |
parent | 611bd0b2d3b40f306f120de5bb5d7edeccb0d32e (diff) |
Use ComputeAngleGains for the echo and dedicated effects
Diffstat (limited to 'Alc/alcDedicated.c')
-rw-r--r-- | Alc/alcDedicated.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/Alc/alcDedicated.c b/Alc/alcDedicated.c index 9f331e8e..81c7a3a4 100644 --- a/Alc/alcDedicated.c +++ b/Alc/alcDedicated.c @@ -53,9 +53,7 @@ static ALboolean DedicatedDeviceUpdate(ALeffectState *effect, ALCdevice *Device) static ALvoid DedicatedUpdate(ALeffectState *effect, ALCdevice *device, const ALeffectslot *Slot) { ALdedicatedState *state = (ALdedicatedState*)effect; - const ALfloat *ChannelGain; ALfloat Gain; - ALint pos; ALsizei s; Gain = Slot->Gain * Slot->effect.Dedicated.Gain; @@ -63,13 +61,7 @@ static ALvoid DedicatedUpdate(ALeffectState *effect, ALCdevice *device, const AL state->gains[s] = 0.0f; if(Slot->effect.type == AL_EFFECT_DEDICATED_DIALOGUE) - { - pos = aluCart2LUTpos(0.0f, 1.0f); - ChannelGain = device->PanningLUT[pos]; - - for(s = 0;s < MAXCHANNELS;s++) - state->gains[s] = ChannelGain[s] * Gain; - } + ComputeAngleGains(device, aluAtan2(0.0f, 1.0f), 0.0f, Gain, state->gains); else if(Slot->effect.type == AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT) state->gains[LFE] = Gain; } |