aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects/dedicated.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-05-25 22:07:31 -0700
committerChris Robinson <[email protected]>2013-05-25 22:07:31 -0700
commitd1c5599c8ead4905d46e5d86f3f0547d3a925d44 (patch)
tree28ae38a4b174dd3d96d9046901bee0408c76857a /Alc/effects/dedicated.c
parent6571d805400f018b51835a8e37752409af9b1c4d (diff)
Use an ALeffectProps union to store the effect properties
Diffstat (limited to 'Alc/effects/dedicated.c')
-rw-r--r--Alc/effects/dedicated.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/Alc/effects/dedicated.c b/Alc/effects/dedicated.c
index 184fe292..35d26cc0 100644
--- a/Alc/effects/dedicated.c
+++ b/Alc/effects/dedicated.c
@@ -60,13 +60,13 @@ static ALvoid ALdedicatedState_Update(ALdedicatedState *state, ALCdevice *device
ALfloat Gain;
ALsizei s;
- Gain = Slot->Gain * Slot->effect.Dedicated.Gain;
+ Gain = Slot->Gain * Slot->EffectProps.Dedicated.Gain;
for(s = 0;s < MaxChannels;s++)
state->gains[s] = 0.0f;
- if(Slot->effect.type == AL_EFFECT_DEDICATED_DIALOGUE)
+ if(Slot->EffectType == AL_EFFECT_DEDICATED_DIALOGUE)
ComputeAngleGains(device, atan2f(0.0f, 1.0f), 0.0f, Gain, state->gains);
- else if(Slot->effect.type == AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT)
+ else if(Slot->EffectType == AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT)
state->gains[LFE] = Gain;
}
@@ -132,11 +132,12 @@ void ALdedicated_SetParamiv(ALeffect *effect, ALCcontext *context, ALenum param,
}
void ALdedicated_SetParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat val)
{
+ ALeffectProps *props = &effect->Props;
switch(param)
{
case AL_DEDICATED_GAIN:
if(val >= 0.0f && isfinite(val))
- effect->Dedicated.Gain = val;
+ props->Dedicated.Gain = val;
else
alSetError(context, AL_INVALID_VALUE);
break;
@@ -159,10 +160,11 @@ void ALdedicated_GetParamiv(ALeffect *effect, ALCcontext *context, ALenum param,
}
void ALdedicated_GetParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *val)
{
+ const ALeffectProps *props = &effect->Props;
switch(param)
{
case AL_DEDICATED_GAIN:
- *val = effect->Dedicated.Gain;
+ *val = props->Dedicated.Gain;
break;
default: