aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alcEcho.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/alcEcho.c
parent5516d8df0b21722c96189b946a8a10e9cbb0c001 (diff)
Auto-generate wrappers to upcast objects before calling user methods
Diffstat (limited to 'Alc/alcEcho.c')
-rw-r--r--Alc/alcEcho.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/Alc/alcEcho.c b/Alc/alcEcho.c
index 3fbd5232..ada61c96 100644
--- a/Alc/alcEcho.c
+++ b/Alc/alcEcho.c
@@ -51,19 +51,16 @@ typedef struct ALechoState {
ALfloat history[2];
} ALechoState;
-static ALvoid ALechoState_Destroy(ALeffectState *effect)
+static ALvoid ALechoState_Destroy(ALechoState *state)
{
- ALechoState *state = STATIC_UPCAST(ALechoState, ALeffectState, effect);
-
free(state->SampleBuffer);
state->SampleBuffer = NULL;
free(state);
}
-static ALboolean ALechoState_DeviceUpdate(ALeffectState *effect, ALCdevice *Device)
+static ALboolean ALechoState_DeviceUpdate(ALechoState *state, ALCdevice *Device)
{
- ALechoState *state = STATIC_UPCAST(ALechoState, ALeffectState, effect);
ALuint maxlen, i;
// Use the next power of 2 for the buffer length, so the tap offsets can be
@@ -88,9 +85,8 @@ static ALboolean ALechoState_DeviceUpdate(ALeffectState *effect, ALCdevice *Devi
return AL_TRUE;
}
-static ALvoid ALechoState_Update(ALeffectState *effect, ALCdevice *Device, const ALeffectslot *Slot)
+static ALvoid ALechoState_Update(ALechoState *state, ALCdevice *Device, const ALeffectslot *Slot)
{
- ALechoState *state = STATIC_UPCAST(ALechoState, ALeffectState, effect);
ALuint frequency = Device->Frequency;
ALfloat lrpan, cw, g, gain;
ALfloat dirGain;
@@ -124,9 +120,8 @@ static ALvoid ALechoState_Update(ALeffectState *effect, ALCdevice *Device, const
ComputeAngleGains(Device, atan2f(+lrpan, 0.0f), (1.0f-dirGain)*F_PI, gain, state->Gain[1]);
}
-static ALvoid ALechoState_Process(ALeffectState *effect, ALuint SamplesToDo, const ALfloat *RESTRICT SamplesIn, ALfloat (*RESTRICT SamplesOut)[BUFFERSIZE])
+static ALvoid ALechoState_Process(ALechoState *state, ALuint SamplesToDo, const ALfloat *RESTRICT SamplesIn, ALfloat (*RESTRICT SamplesOut)[BUFFERSIZE])
{
- ALechoState *state = STATIC_UPCAST(ALechoState, ALeffectState, effect);
const ALuint mask = state->BufferLength-1;
const ALuint tap1 = state->Tap[0].delay;
const ALuint tap2 = state->Tap[1].delay;