aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects/dedicated.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-10-03 05:02:16 -0700
committerChris Robinson <[email protected]>2013-10-03 05:02:16 -0700
commit764ea95781486f86c7be956e84cf97ab893ac07b (patch)
treea6fc6b17121a2f4cab499b97a59378470fb3cb75 /Alc/effects/dedicated.c
parent99fa5911bc9f427c96fe800f94d31e4942805fd2 (diff)
Use helpers to set channel gain arrays
Also avoid unnecessary clearing.
Diffstat (limited to 'Alc/effects/dedicated.c')
-rw-r--r--Alc/effects/dedicated.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Alc/effects/dedicated.c b/Alc/effects/dedicated.c
index 8be7fee6..2aa08953 100644
--- a/Alc/effects/dedicated.c
+++ b/Alc/effects/dedicated.c
@@ -61,13 +61,14 @@ static ALvoid ALdedicatedState_update(ALdedicatedState *state, ALCdevice *device
ALsizei s;
Gain = Slot->Gain * Slot->EffectProps.Dedicated.Gain;
- for(s = 0;s < MaxChannels;s++)
- state->gains[s] = 0.0f;
-
if(Slot->EffectType == AL_EFFECT_DEDICATED_DIALOGUE)
ComputeAngleGains(device, atan2f(0.0f, 1.0f), 0.0f, Gain, state->gains);
else if(Slot->EffectType == AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT)
+ {
+ for(s = 0;s < MaxChannels;s++)
+ state->gains[s] = 0.0f;
state->gains[LFE] = Gain;
+ }
}
static ALvoid ALdedicatedState_process(ALdedicatedState *state, ALuint SamplesToDo, const ALfloat *restrict SamplesIn, ALfloat (*restrict SamplesOut)[BUFFERSIZE])