aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects/dedicated.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-09-21 05:42:35 -0700
committerChris Robinson <[email protected]>2017-09-21 05:42:35 -0700
commit90cedbea49e9756d97033962f6c1145991bc7095 (patch)
treedf6c91ac4c7f17b33b9153994ccf3fbaf3ce9a70 /Alc/effects/dedicated.c
parent0b243f1aaf5251823bb0fda7fbb9cf30706fdf33 (diff)
Pass the context to the auxiliary effect update method
Diffstat (limited to 'Alc/effects/dedicated.c')
-rw-r--r--Alc/effects/dedicated.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/Alc/effects/dedicated.c b/Alc/effects/dedicated.c
index 52d0ec6d..32e5b49e 100644
--- a/Alc/effects/dedicated.c
+++ b/Alc/effects/dedicated.c
@@ -37,7 +37,7 @@ typedef struct ALdedicatedState {
static ALvoid ALdedicatedState_Destruct(ALdedicatedState *state);
static ALboolean ALdedicatedState_deviceUpdate(ALdedicatedState *state, ALCdevice *device);
-static ALvoid ALdedicatedState_update(ALdedicatedState *state, const ALCdevice *device, const ALeffectslot *Slot, const ALeffectProps *props);
+static ALvoid ALdedicatedState_update(ALdedicatedState *state, const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props);
static ALvoid ALdedicatedState_process(ALdedicatedState *state, ALsizei SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALsizei NumChannels);
DECLARE_DEFAULT_ALLOCATORS(ALdedicatedState)
@@ -65,16 +65,17 @@ static ALboolean ALdedicatedState_deviceUpdate(ALdedicatedState *UNUSED(state),
return AL_TRUE;
}
-static ALvoid ALdedicatedState_update(ALdedicatedState *state, const ALCdevice *device, const ALeffectslot *Slot, const ALeffectProps *props)
+static ALvoid ALdedicatedState_update(ALdedicatedState *state, const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props)
{
+ const ALCdevice *device = context->Device;
ALfloat Gain;
ALuint i;
for(i = 0;i < MAX_OUTPUT_CHANNELS;i++)
state->gains[i] = 0.0f;
- Gain = Slot->Params.Gain * props->Dedicated.Gain;
- if(Slot->Params.EffectType == AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT)
+ Gain = slot->Params.Gain * props->Dedicated.Gain;
+ if(slot->Params.EffectType == AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT)
{
int idx;
if((idx=GetChannelIdxByName(device->RealOut, LFE)) != -1)
@@ -84,7 +85,7 @@ static ALvoid ALdedicatedState_update(ALdedicatedState *state, const ALCdevice *
state->gains[idx] = Gain;
}
}
- else if(Slot->Params.EffectType == AL_EFFECT_DEDICATED_DIALOGUE)
+ else if(slot->Params.EffectType == AL_EFFECT_DEDICATED_DIALOGUE)
{
int idx;
/* Dialog goes to the front-center speaker if it exists, otherwise it