aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alcFlanger.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/alcFlanger.c
parent5516d8df0b21722c96189b946a8a10e9cbb0c001 (diff)
Auto-generate wrappers to upcast objects before calling user methods
Diffstat (limited to 'Alc/alcFlanger.c')
-rw-r--r--Alc/alcFlanger.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/Alc/alcFlanger.c b/Alc/alcFlanger.c
index a69d7006..574fa9d7 100644
--- a/Alc/alcFlanger.c
+++ b/Alc/alcFlanger.c
@@ -50,10 +50,8 @@ typedef struct ALflangerState {
ALfloat feedback;
} ALflangerState;
-static ALvoid ALflangerState_Destroy(ALeffectState *effect)
+static ALvoid ALflangerState_Destroy(ALflangerState *state)
{
- ALflangerState *state = STATIC_UPCAST(ALflangerState, ALeffectState, effect);
-
free(state->SampleBufferLeft);
state->SampleBufferLeft = NULL;
@@ -63,9 +61,8 @@ static ALvoid ALflangerState_Destroy(ALeffectState *effect)
free(state);
}
-static ALboolean ALflangerState_DeviceUpdate(ALeffectState *effect, ALCdevice *Device)
+static ALboolean ALflangerState_DeviceUpdate(ALflangerState *state, ALCdevice *Device)
{
- ALflangerState *state = STATIC_UPCAST(ALflangerState, ALeffectState, effect);
ALuint maxlen;
ALuint it;
@@ -96,9 +93,8 @@ static ALboolean ALflangerState_DeviceUpdate(ALeffectState *effect, ALCdevice *D
return AL_TRUE;
}
-static ALvoid ALflangerState_Update(ALeffectState *effect, ALCdevice *Device, const ALeffectslot *Slot)
+static ALvoid ALflangerState_Update(ALflangerState *state, ALCdevice *Device, const ALeffectslot *Slot)
{
- ALflangerState *state = STATIC_UPCAST(ALflangerState, ALeffectState, effect);
ALfloat frequency = Device->Frequency;
ALfloat rate;
ALint phase;
@@ -234,10 +230,8 @@ DECL_TEMPLATE(Sinusoid)
#undef DECL_TEMPLATE
-static ALvoid ALflangerState_Process(ALeffectState *effect, ALuint SamplesToDo, const ALfloat *RESTRICT SamplesIn, ALfloat (*RESTRICT SamplesOut)[BUFFERSIZE])
+static ALvoid ALflangerState_Process(ALflangerState *state, ALuint SamplesToDo, const ALfloat *RESTRICT SamplesIn, ALfloat (*RESTRICT SamplesOut)[BUFFERSIZE])
{
- ALflangerState *state = STATIC_UPCAST(ALflangerState, ALeffectState, effect);
-
if(state->waveform == AL_FLANGER_WAVEFORM_TRIANGLE)
ProcessTriangle(state, SamplesToDo, SamplesIn, SamplesOut);
else if(state->waveform == AL_FLANGER_WAVEFORM_SINUSOID)