aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-03-13 14:49:58 -0700
committerChris Robinson <[email protected]>2012-03-13 14:49:58 -0700
commitb5ed2a5351c065fb1de5ecc52e3d981458cd2f2c (patch)
tree2f7d3e15ebb4905390a5e3e5554c8acdf8701f41 /Alc
parent55c5e4fe92eefc4c9208a4f6ac967247a4c4ab34 (diff)
Pass a device to the effect update functions
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c2
-rw-r--r--Alc/ALu.c4
-rw-r--r--Alc/alcDedicated.c3
-rw-r--r--Alc/alcEcho.c3
-rw-r--r--Alc/alcModulator.c3
-rw-r--r--Alc/alcReverb.c7
6 files changed, 9 insertions, 13 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 328443d3..32bcf917 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1307,7 +1307,7 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
return ALC_INVALID_DEVICE;
}
slot->NeedsUpdate = AL_FALSE;
- ALeffectState_Update(slot->EffectState, context, slot);
+ ALeffectState_Update(slot->EffectState, device, slot);
}
UnlockUIntMapRead(&context->EffectSlotMap);
diff --git a/Alc/ALu.c b/Alc/ALu.c
index f19a78ef..ac68a71c 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -975,7 +975,7 @@ ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size)
(*slot)->PendingClicks[0] = 0.0f;
if(!DeferUpdates && ExchangeInt(&(*slot)->NeedsUpdate, AL_FALSE))
- ALeffectState_Update((*slot)->EffectState, ctx, *slot);
+ ALeffectState_Update((*slot)->EffectState, device, *slot);
ALeffectState_Process((*slot)->EffectState, SamplesToDo,
(*slot)->WetBuffer, device->DryBuffer);
@@ -1001,7 +1001,7 @@ ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size)
(*slot)->PendingClicks[0] = 0.0f;
if(ExchangeInt(&(*slot)->NeedsUpdate, AL_FALSE))
- ALeffectState_Update((*slot)->EffectState, ctx, *slot);
+ ALeffectState_Update((*slot)->EffectState, device, *slot);
ALeffectState_Process((*slot)->EffectState, SamplesToDo,
(*slot)->WetBuffer, device->DryBuffer);
diff --git a/Alc/alcDedicated.c b/Alc/alcDedicated.c
index 2f9e3dcc..5bd22a72 100644
--- a/Alc/alcDedicated.c
+++ b/Alc/alcDedicated.c
@@ -50,10 +50,9 @@ static ALboolean DedicatedDeviceUpdate(ALeffectState *effect, ALCdevice *Device)
return AL_TRUE;
}
-static ALvoid DedicatedUpdate(ALeffectState *effect, ALCcontext *Context, const ALeffectslot *Slot)
+static ALvoid DedicatedUpdate(ALeffectState *effect, ALCdevice *device, const ALeffectslot *Slot)
{
ALdedicatedState *state = (ALdedicatedState*)effect;
- ALCdevice *device = Context->Device;
const ALfloat *ChannelGain;
ALfloat Gain;
ALint pos;
diff --git a/Alc/alcEcho.c b/Alc/alcEcho.c
index 0a8980a0..150720a6 100644
--- a/Alc/alcEcho.c
+++ b/Alc/alcEcho.c
@@ -90,10 +90,9 @@ static ALboolean EchoDeviceUpdate(ALeffectState *effect, ALCdevice *Device)
return AL_TRUE;
}
-static ALvoid EchoUpdate(ALeffectState *effect, ALCcontext *Context, const ALeffectslot *Slot)
+static ALvoid EchoUpdate(ALeffectState *effect, ALCdevice *Device, const ALeffectslot *Slot)
{
ALechoState *state = (ALechoState*)effect;
- ALCdevice *Device = Context->Device;
ALuint frequency = Device->Frequency;
ALfloat dirGain, ambientGain;
const ALfloat *ChannelGain;
diff --git a/Alc/alcModulator.c b/Alc/alcModulator.c
index 328e1678..2cdbcd0b 100644
--- a/Alc/alcModulator.c
+++ b/Alc/alcModulator.c
@@ -127,10 +127,9 @@ static ALboolean ModulatorDeviceUpdate(ALeffectState *effect, ALCdevice *Device)
(void)Device;
}
-static ALvoid ModulatorUpdate(ALeffectState *effect, ALCcontext *Context, const ALeffectslot *Slot)
+static ALvoid ModulatorUpdate(ALeffectState *effect, ALCdevice *Device, const ALeffectslot *Slot)
{
ALmodulatorState *state = (ALmodulatorState*)effect;
- ALCdevice *Device = Context->Device;
ALfloat gain, cw, a = 0.0f;
ALuint index;
diff --git a/Alc/alcReverb.c b/Alc/alcReverb.c
index f21819ef..f11b4ee4 100644
--- a/Alc/alcReverb.c
+++ b/Alc/alcReverb.c
@@ -1081,10 +1081,10 @@ static ALvoid Update3DPanning(const ALCdevice *Device, const ALfloat *Reflection
// This updates the EAX reverb state. This is called any time the EAX reverb
// effect is loaded into a slot.
-static ALvoid ReverbUpdate(ALeffectState *effect, ALCcontext *Context, const ALeffectslot *Slot)
+static ALvoid ReverbUpdate(ALeffectState *effect, ALCdevice *Device, const ALeffectslot *Slot)
{
ALverbState *State = (ALverbState*)effect;
- ALuint frequency = Context->Device->Frequency;
+ ALuint frequency = Device->Frequency;
ALboolean isEAX = AL_FALSE;
ALfloat cw, x, y, hfRatio;
@@ -1154,12 +1154,11 @@ static ALvoid ReverbUpdate(ALeffectState *effect, ALCcontext *Context, const ALe
hfRatio, cw, frequency, State);
// Update early and late 3D panning.
- Update3DPanning(Context->Device, Slot->effect.Reverb.ReflectionsPan,
+ Update3DPanning(Device, Slot->effect.Reverb.ReflectionsPan,
Slot->effect.Reverb.LateReverbPan, Slot->Gain, State);
}
else
{
- ALCdevice *Device = Context->Device;
ALfloat gain = Slot->Gain;
ALuint index;