diff options
author | Chris Robinson <[email protected]> | 2013-05-21 05:02:25 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2013-05-21 05:02:25 -0700 |
commit | 5c8c40afefc4e42635da91a876232cfc0975f6fd (patch) | |
tree | a05479e246a9494c1d590f9b080dee253c2505d9 /Alc/alcEqualizer.c | |
parent | 5516d8df0b21722c96189b946a8a10e9cbb0c001 (diff) |
Auto-generate wrappers to upcast objects before calling user methods
Diffstat (limited to 'Alc/alcEqualizer.c')
-rw-r--r-- | Alc/alcEqualizer.c | 14 |
1 files changed, 4 insertions, 10 deletions
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; |