aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alcEqualizer.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/alcEqualizer.c
parentb6da74b6e2eb6ad72179e07bb7d50da4c2c95390 (diff)
Rename some inheritance macros
Diffstat (limited to 'Alc/alcEqualizer.c')
-rw-r--r--Alc/alcEqualizer.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/Alc/alcEqualizer.c b/Alc/alcEqualizer.c
index d4b4f855..62097cd5 100644
--- a/Alc/alcEqualizer.c
+++ b/Alc/alcEqualizer.c
@@ -97,13 +97,13 @@ typedef struct ALequalizerState {
static ALvoid EqualizerDestroy(ALeffectState *effect)
{
- ALequalizerState *state = GET_PARENT_TYPE(ALequalizerState, ALeffectState, effect);
+ ALequalizerState *state = STATIC_UPCAST(ALequalizerState, ALeffectState, effect);
free(state);
}
static ALboolean EqualizerDeviceUpdate(ALeffectState *effect, ALCdevice *Device)
{
- ALequalizerState *state = GET_PARENT_TYPE(ALequalizerState, ALeffectState, effect);
+ ALequalizerState *state = STATIC_UPCAST(ALequalizerState, ALeffectState, effect);
state->frequency = (ALfloat)Device->Frequency;
@@ -112,7 +112,7 @@ static ALboolean EqualizerDeviceUpdate(ALeffectState *effect, ALCdevice *Device)
static ALvoid EqualizerUpdate(ALeffectState *effect, ALCdevice *Device, const ALeffectslot *Slot)
{
- ALequalizerState *state = GET_PARENT_TYPE(ALequalizerState, ALeffectState, effect);
+ ALequalizerState *state = STATIC_UPCAST(ALequalizerState, ALeffectState, effect);
ALfloat gain = sqrtf(1.0f / Device->NumChan) * Slot->Gain;
ALuint it;
@@ -217,7 +217,7 @@ static ALvoid EqualizerUpdate(ALeffectState *effect, ALCdevice *Device, const AL
static ALvoid EqualizerProcess(ALeffectState *effect, ALuint SamplesToDo, const ALfloat *RESTRICT SamplesIn, ALfloat (*RESTRICT SamplesOut)[BUFFERSIZE])
{
- ALequalizerState *state = GET_PARENT_TYPE(ALequalizerState, ALeffectState, effect);
+ ALequalizerState *state = STATIC_UPCAST(ALequalizerState, ALeffectState, effect);
ALuint base;
ALuint it;
ALuint kt;
@@ -276,10 +276,10 @@ ALeffectState *EqualizerCreate(void)
if(!state)
return NULL;
- GET_DERIVED_TYPE(ALeffectState, state)->Destroy = EqualizerDestroy;
- GET_DERIVED_TYPE(ALeffectState, state)->DeviceUpdate = EqualizerDeviceUpdate;
- GET_DERIVED_TYPE(ALeffectState, state)->Update = EqualizerUpdate;
- GET_DERIVED_TYPE(ALeffectState, state)->Process = EqualizerProcess;
+ STATIC_CAST(ALeffectState, state)->Destroy = EqualizerDestroy;
+ STATIC_CAST(ALeffectState, state)->DeviceUpdate = EqualizerDeviceUpdate;
+ STATIC_CAST(ALeffectState, state)->Update = EqualizerUpdate;
+ STATIC_CAST(ALeffectState, state)->Process = EqualizerProcess;
state->bandfilter[0].type = LOW_SHELF;
state->bandfilter[1].type = PEAKING;
@@ -296,7 +296,7 @@ ALeffectState *EqualizerCreate(void)
state->bandfilter[it].y[1] = 0.0f;
}
- return GET_DERIVED_TYPE(ALeffectState, state);
+ return STATIC_CAST(ALeffectState, state);
}
void equalizer_SetParami(ALeffect *effect, ALCcontext *context, ALenum param, ALint val)