aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alcFlanger.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-05-21 02:30:11 -0700
committerChris Robinson <[email protected]>2013-05-21 02:30:11 -0700
commit44da54ec7f1826e3318202084e49a58a886a3f7b (patch)
tree519a4908b45472563d988b323187f9acec4169f6 /Alc/alcFlanger.c
parentb6da74b6e2eb6ad72179e07bb7d50da4c2c95390 (diff)
Rename some inheritance macros
Diffstat (limited to 'Alc/alcFlanger.c')
-rw-r--r--Alc/alcFlanger.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/Alc/alcFlanger.c b/Alc/alcFlanger.c
index 7409a4c1..7c753eb6 100644
--- a/Alc/alcFlanger.c
+++ b/Alc/alcFlanger.c
@@ -52,7 +52,7 @@ typedef struct ALflangerState {
static ALvoid FlangerDestroy(ALeffectState *effect)
{
- ALflangerState *state = GET_PARENT_TYPE(ALflangerState, ALeffectState, effect);
+ ALflangerState *state = STATIC_UPCAST(ALflangerState, ALeffectState, effect);
if(state)
{
free(state->SampleBufferLeft);
@@ -67,7 +67,7 @@ static ALvoid FlangerDestroy(ALeffectState *effect)
static ALboolean FlangerDeviceUpdate(ALeffectState *effect, ALCdevice *Device)
{
- ALflangerState *state = GET_PARENT_TYPE(ALflangerState, ALeffectState, effect);
+ ALflangerState *state = STATIC_UPCAST(ALflangerState, ALeffectState, effect);
ALuint maxlen;
ALuint it;
@@ -100,7 +100,7 @@ static ALboolean FlangerDeviceUpdate(ALeffectState *effect, ALCdevice *Device)
static ALvoid FlangerUpdate(ALeffectState *effect, ALCdevice *Device, const ALeffectslot *Slot)
{
- ALflangerState *state = GET_PARENT_TYPE(ALflangerState, ALeffectState, effect);
+ ALflangerState *state = STATIC_UPCAST(ALflangerState, ALeffectState, effect);
ALfloat frequency = Device->Frequency;
ALfloat rate;
ALint phase;
@@ -238,7 +238,7 @@ DECL_TEMPLATE(Sinusoid)
static ALvoid FlangerProcess(ALeffectState *effect, ALuint SamplesToDo, const ALfloat *RESTRICT SamplesIn, ALfloat (*RESTRICT SamplesOut)[BUFFERSIZE])
{
- ALflangerState *state = GET_PARENT_TYPE(ALflangerState, ALeffectState, effect);
+ ALflangerState *state = STATIC_UPCAST(ALflangerState, ALeffectState, effect);
if(state->waveform == AL_FLANGER_WAVEFORM_TRIANGLE)
ProcessTriangle(state, SamplesToDo, SamplesIn, SamplesOut);
@@ -254,17 +254,17 @@ ALeffectState *FlangerCreate(void)
if(!state)
return NULL;
- GET_DERIVED_TYPE(ALeffectState, state)->Destroy = FlangerDestroy;
- GET_DERIVED_TYPE(ALeffectState, state)->DeviceUpdate = FlangerDeviceUpdate;
- GET_DERIVED_TYPE(ALeffectState, state)->Update = FlangerUpdate;
- GET_DERIVED_TYPE(ALeffectState, state)->Process = FlangerProcess;
+ STATIC_CAST(ALeffectState, state)->Destroy = FlangerDestroy;
+ STATIC_CAST(ALeffectState, state)->DeviceUpdate = FlangerDeviceUpdate;
+ STATIC_CAST(ALeffectState, state)->Update = FlangerUpdate;
+ STATIC_CAST(ALeffectState, state)->Process = FlangerProcess;
state->BufferLength = 0;
state->SampleBufferLeft = NULL;
state->SampleBufferRight = NULL;
state->offset = 0;
- return GET_DERIVED_TYPE(ALeffectState, state);
+ return STATIC_CAST(ALeffectState, state);
}
void flanger_SetParami(ALeffect *effect, ALCcontext *context, ALenum param, ALint val)