aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alcReverb.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-05-21 05:02:25 -0700
committerChris Robinson <[email protected]>2013-05-21 05:02:25 -0700
commit5c8c40afefc4e42635da91a876232cfc0975f6fd (patch)
treea05479e246a9494c1d590f9b080dee253c2505d9 /Alc/alcReverb.c
parent5516d8df0b21722c96189b946a8a10e9cbb0c001 (diff)
Auto-generate wrappers to upcast objects before calling user methods
Diffstat (limited to 'Alc/alcReverb.c')
-rw-r--r--Alc/alcReverb.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/Alc/alcReverb.c b/Alc/alcReverb.c
index b84dad96..2bed00a5 100644
--- a/Alc/alcReverb.c
+++ b/Alc/alcReverb.c
@@ -606,9 +606,8 @@ static ALvoid ALreverbState_ProcessEax(ALreverbState *State, ALuint SamplesToDo,
}
}
-static ALvoid ALreverbState_Process(ALeffectState *effect, ALuint SamplesToDo, const ALfloat *RESTRICT SamplesIn, ALfloat (*RESTRICT SamplesOut)[BUFFERSIZE])
+static ALvoid ALreverbState_Process(ALreverbState *State, ALuint SamplesToDo, const ALfloat *RESTRICT SamplesIn, ALfloat (*RESTRICT SamplesOut)[BUFFERSIZE])
{
- ALreverbState *State = STATIC_UPCAST(ALreverbState, ALeffectState, effect);
if(State->IsEax)
ALreverbState_ProcessEax(State, SamplesToDo, SamplesIn, SamplesOut);
else
@@ -732,9 +731,8 @@ static ALboolean AllocLines(ALuint frequency, ALreverbState *State)
// This updates the device-dependant EAX reverb state. This is called on
// initialization and any time the device parameters (eg. playback frequency,
// format) have been changed.
-static ALboolean ALreverbState_DeviceUpdate(ALeffectState *effect, ALCdevice *Device)
+static ALboolean ALreverbState_DeviceUpdate(ALreverbState *State, ALCdevice *Device)
{
- ALreverbState *State = STATIC_UPCAST(ALreverbState, ALeffectState, effect);
ALuint frequency = Device->Frequency, index;
// Allocate the delay lines.
@@ -1084,9 +1082,8 @@ 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 ALreverbState_Update(ALeffectState *effect, ALCdevice *Device, const ALeffectslot *Slot)
+static ALvoid ALreverbState_Update(ALreverbState *State, ALCdevice *Device, const ALeffectslot *Slot)
{
- ALreverbState *State = STATIC_UPCAST(ALreverbState, ALeffectState, effect);
ALuint frequency = Device->Frequency;
ALfloat cw, x, y, hfRatio;
@@ -1174,10 +1171,8 @@ static ALvoid ALreverbState_Update(ALeffectState *effect, ALCdevice *Device, con
// This destroys the reverb state. It should be called only when the effect
// slot has a different (or no) effect loaded over the reverb effect.
-static ALvoid ALreverbState_Destroy(ALeffectState *effect)
+static ALvoid ALreverbState_Destroy(ALreverbState *State)
{
- ALreverbState *State = STATIC_UPCAST(ALreverbState, ALeffectState, effect);
-
free(State->SampleBuffer);
State->SampleBuffer = NULL;
@@ -1190,7 +1185,7 @@ DEFINE_ALEFFECTSTATE_VTABLE(ALreverbState);
// effect is loaded into a slot that doesn't already have a reverb effect.
ALeffectState *ReverbCreate(void)
{
- ALreverbState *State = NULL;
+ ALreverbState *State;
ALuint index;
State = malloc(sizeof(ALreverbState));