From 5c8c40afefc4e42635da91a876232cfc0975f6fd Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 21 May 2013 05:02:25 -0700 Subject: Auto-generate wrappers to upcast objects before calling user methods --- Alc/alcEqualizer.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'Alc/alcEqualizer.c') diff --git a/Alc/alcEqualizer.c b/Alc/alcEqualizer.c index 50a83c9a..6bc4ed12 100644 --- a/Alc/alcEqualizer.c +++ b/Alc/alcEqualizer.c @@ -95,24 +95,19 @@ typedef struct ALequalizerState { ALfloat frequency; } ALequalizerState; -static ALvoid ALequalizerState_Destroy(ALeffectState *effect) +static ALvoid ALequalizerState_Destroy(ALequalizerState *state) { - ALequalizerState *state = STATIC_UPCAST(ALequalizerState, ALeffectState, effect); free(state); } -static ALboolean ALequalizerState_DeviceUpdate(ALeffectState *effect, ALCdevice *Device) +static ALboolean ALequalizerState_DeviceUpdate(ALequalizerState *state, ALCdevice *Device) { - ALequalizerState *state = STATIC_UPCAST(ALequalizerState, ALeffectState, effect); - state->frequency = (ALfloat)Device->Frequency; - return AL_TRUE; } -static ALvoid ALequalizerState_Update(ALeffectState *effect, ALCdevice *Device, const ALeffectslot *Slot) +static ALvoid ALequalizerState_Update(ALequalizerState *state, ALCdevice *Device, const ALeffectslot *Slot) { - ALequalizerState *state = STATIC_UPCAST(ALequalizerState, ALeffectState, effect); ALfloat gain = sqrtf(1.0f / Device->NumChan) * Slot->Gain; ALuint it; @@ -215,9 +210,8 @@ static ALvoid ALequalizerState_Update(ALeffectState *effect, ALCdevice *Device, } } -static ALvoid ALequalizerState_Process(ALeffectState *effect, ALuint SamplesToDo, const ALfloat *RESTRICT SamplesIn, ALfloat (*RESTRICT SamplesOut)[BUFFERSIZE]) +static ALvoid ALequalizerState_Process(ALequalizerState *state, ALuint SamplesToDo, const ALfloat *RESTRICT SamplesIn, ALfloat (*RESTRICT SamplesOut)[BUFFERSIZE]) { - ALequalizerState *state = STATIC_UPCAST(ALequalizerState, ALeffectState, effect); ALuint base; ALuint it; ALuint kt; -- cgit v1.2.3