aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alcDistortion.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/alcDistortion.c
parent5516d8df0b21722c96189b946a8a10e9cbb0c001 (diff)
Auto-generate wrappers to upcast objects before calling user methods
Diffstat (limited to 'Alc/alcDistortion.c')
-rw-r--r--Alc/alcDistortion.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/Alc/alcDistortion.c b/Alc/alcDistortion.c
index 50627093..8c0f5e97 100644
--- a/Alc/alcDistortion.c
+++ b/Alc/alcDistortion.c
@@ -59,22 +59,20 @@ typedef struct ALdistortionState {
ALfloat edge_coeff;
} ALdistortionState;
-static ALvoid ALdistortionState_Destroy(ALeffectState *effect)
+static ALvoid ALdistortionState_Destroy(ALdistortionState *state)
{
- ALdistortionState *state = STATIC_UPCAST(ALdistortionState, ALeffectState, effect);
free(state);
}
-static ALboolean ALdistortionState_DeviceUpdate(ALeffectState *effect, ALCdevice *Device)
+static ALboolean ALdistortionState_DeviceUpdate(ALdistortionState *state, ALCdevice *Device)
{
return AL_TRUE;
- (void)effect;
+ (void)state;
(void)Device;
}
-static ALvoid ALdistortionState_Update(ALeffectState *effect, ALCdevice *Device, const ALeffectslot *Slot)
+static ALvoid ALdistortionState_Update(ALdistortionState *state, ALCdevice *Device, const ALeffectslot *Slot)
{
- ALdistortionState *state = STATIC_UPCAST(ALdistortionState, ALeffectState, effect);
ALfloat gain = sqrtf(1.0f / Device->NumChan) * Slot->Gain;
ALfloat frequency = (ALfloat)Device->Frequency;
ALuint it;
@@ -126,9 +124,8 @@ static ALvoid ALdistortionState_Update(ALeffectState *effect, ALCdevice *Device,
state->bandpass.a[2] = 1.0f - alpha;
}
-static ALvoid ALdistortionState_Process(ALeffectState *effect, ALuint SamplesToDo, const ALfloat *RESTRICT SamplesIn, ALfloat (*RESTRICT SamplesOut)[BUFFERSIZE])
+static ALvoid ALdistortionState_Process(ALdistortionState *state, ALuint SamplesToDo, const ALfloat *RESTRICT SamplesIn, ALfloat (*RESTRICT SamplesOut)[BUFFERSIZE])
{
- ALdistortionState *state = STATIC_UPCAST(ALdistortionState, ALeffectState, effect);
const ALfloat fc = state->edge_coeff;
float oversample_buffer[64][4];
ALfloat tempsmp;