diff options
author | Chris Robinson <[email protected]> | 2013-05-21 13:02:56 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2013-05-21 13:02:56 -0700 |
commit | eaccaa50284da45401d841a867a7a10daa00dbd0 (patch) | |
tree | 0f6a62e6e13adf982a00175354a288d5e02b9e58 /Alc | |
parent | a5d94f5d09be24bf34cbf8433a288cfd9ca396fb (diff) |
Rename the effect state's Destroy method to Destruct
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALc.c | 8 | ||||
-rw-r--r-- | Alc/alcChorus.c | 4 | ||||
-rw-r--r-- | Alc/alcDedicated.c | 4 | ||||
-rw-r--r-- | Alc/alcDistortion.c | 4 | ||||
-rw-r--r-- | Alc/alcEcho.c | 4 | ||||
-rw-r--r-- | Alc/alcEqualizer.c | 4 | ||||
-rw-r--r-- | Alc/alcFlanger.c | 4 | ||||
-rw-r--r-- | Alc/alcModulator.c | 4 | ||||
-rw-r--r-- | Alc/alcReverb.c | 4 |
9 files changed, 21 insertions, 19 deletions
@@ -1777,8 +1777,9 @@ static ALCvoid FreeDevice(ALCdevice *device) if(device->DefaultSlot) { - ALeffectState_Destroy(device->DefaultSlot->EffectState); - device->DefaultSlot->EffectState = NULL; + ALeffectState *state = device->DefaultSlot->EffectState; + device->DefaultSlot = NULL; + ALeffectStateFactory_destroy(ALeffectState_getCreator(state), state); } if(device->BufferMap.size > 0) @@ -2899,8 +2900,9 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName) } else if(InitializeEffect(device, device->DefaultSlot, &DefaultEffect) != AL_NO_ERROR) { - ALeffectState_Destroy(device->DefaultSlot->EffectState); + ALeffectState *state = device->DefaultSlot->EffectState; device->DefaultSlot = NULL; + ALeffectStateFactory_destroy(ALeffectState_getCreator(state), state); ERR("Failed to initialize the default effect\n"); } } diff --git a/Alc/alcChorus.c b/Alc/alcChorus.c index 018caac5..cf414bbd 100644 --- a/Alc/alcChorus.c +++ b/Alc/alcChorus.c @@ -57,7 +57,7 @@ typedef struct ALchorusState { ALfloat feedback; } ALchorusState; -static ALvoid ALchorusState_Destroy(ALchorusState *state) +static ALvoid ALchorusState_Destruct(ALchorusState *state) { free(state->SampleBufferLeft); state->SampleBufferLeft = NULL; @@ -270,7 +270,7 @@ static ALeffectState *ALchorusStateFactory_create(void) static ALvoid ALchorusStateFactory_destroy(ALeffectState *effect) { ALchorusState *state = STATIC_UPCAST(ALchorusState, ALeffectState, effect); - ALchorusState_Destroy(state); + ALchorusState_Destruct(state); free(state); } diff --git a/Alc/alcDedicated.c b/Alc/alcDedicated.c index fbe2a5f1..dd59c2c5 100644 --- a/Alc/alcDedicated.c +++ b/Alc/alcDedicated.c @@ -43,7 +43,7 @@ typedef struct ALdedicatedState { } ALdedicatedState; -static ALvoid ALdedicatedState_Destroy(ALdedicatedState *state) +static ALvoid ALdedicatedState_Destruct(ALdedicatedState *state) { (void)state; } @@ -111,7 +111,7 @@ ALeffectState *ALdedicatedStateFactory_create(void) static ALvoid ALdedicatedStateFactory_destroy(ALeffectState *effect) { ALdedicatedState *state = STATIC_UPCAST(ALdedicatedState, ALeffectState, effect); - ALdedicatedState_Destroy(state); + ALdedicatedState_Destruct(state); free(state); } diff --git a/Alc/alcDistortion.c b/Alc/alcDistortion.c index ec48ad03..8f52ab5d 100644 --- a/Alc/alcDistortion.c +++ b/Alc/alcDistortion.c @@ -67,7 +67,7 @@ typedef struct ALdistortionState { ALfloat edge_coeff; } ALdistortionState; -static ALvoid ALdistortionState_Destroy(ALdistortionState *state) +static ALvoid ALdistortionState_Destruct(ALdistortionState *state) { (void)state; } @@ -266,7 +266,7 @@ static ALeffectState *ALdistortionStateFactory_create(void) static ALvoid ALdistortionStateFactory_destroy(ALeffectState *effect) { ALdistortionState *state = STATIC_UPCAST(ALdistortionState, ALeffectState, effect); - ALdistortionState_Destroy(state); + ALdistortionState_Destruct(state); free(state); } diff --git a/Alc/alcEcho.c b/Alc/alcEcho.c index e38e1457..4270c863 100644 --- a/Alc/alcEcho.c +++ b/Alc/alcEcho.c @@ -57,7 +57,7 @@ typedef struct ALechoState { FILTER iirFilter; } ALechoState; -static ALvoid ALechoState_Destroy(ALechoState *state) +static ALvoid ALechoState_Destruct(ALechoState *state) { free(state->SampleBuffer); state->SampleBuffer = NULL; @@ -208,7 +208,7 @@ ALeffectState *ALechoStateFactory_create(void) static ALvoid ALechoStateFactory_destroy(ALeffectState *effect) { ALechoState *state = STATIC_UPCAST(ALechoState, ALeffectState, effect); - ALechoState_Destroy(state); + ALechoState_Destruct(state); free(state); } diff --git a/Alc/alcEqualizer.c b/Alc/alcEqualizer.c index 5a1d8841..2c8eb131 100644 --- a/Alc/alcEqualizer.c +++ b/Alc/alcEqualizer.c @@ -102,7 +102,7 @@ typedef struct ALequalizerState { ALEQFilter bandfilter[4]; } ALequalizerState; -static ALvoid ALequalizerState_Destroy(ALequalizerState *state) +static ALvoid ALequalizerState_Destruct(ALequalizerState *state) { (void)state; } @@ -308,7 +308,7 @@ ALeffectState *ALequalizerStateFactory_create(void) static ALvoid ALequalizerStateFactory_destroy(ALeffectState *effect) { ALequalizerState *state = STATIC_UPCAST(ALequalizerState, ALeffectState, effect); - ALequalizerState_Destroy(state); + ALequalizerState_Destruct(state); free(state); } diff --git a/Alc/alcFlanger.c b/Alc/alcFlanger.c index 953828f6..b3f09018 100644 --- a/Alc/alcFlanger.c +++ b/Alc/alcFlanger.c @@ -57,7 +57,7 @@ typedef struct ALflangerState { ALfloat feedback; } ALflangerState; -static ALvoid ALflangerState_Destroy(ALflangerState *state) +static ALvoid ALflangerState_Destruct(ALflangerState *state) { free(state->SampleBufferLeft); state->SampleBufferLeft = NULL; @@ -270,7 +270,7 @@ ALeffectState *ALflangerStateFactory_create(void) static ALvoid ALflangerStateFactory_destroy(ALeffectState *effect) { ALflangerState *state = STATIC_UPCAST(ALflangerState, ALeffectState, effect); - ALflangerState_Destroy(state); + ALflangerState_Destruct(state); free(state); } diff --git a/Alc/alcModulator.c b/Alc/alcModulator.c index 25b5bcc4..847027e6 100644 --- a/Alc/alcModulator.c +++ b/Alc/alcModulator.c @@ -135,7 +135,7 @@ DECL_TEMPLATE(Square) #undef DECL_TEMPLATE -static ALvoid ALmodulatorState_Destroy(ALmodulatorState *state) +static ALvoid ALmodulatorState_Destruct(ALmodulatorState *state) { (void)state; } @@ -225,7 +225,7 @@ static ALeffectState *ALmodulatorStateFactory_create(void) static ALvoid ALmodulatorStateFactory_destroy(ALeffectState *effect) { ALmodulatorState *state = STATIC_UPCAST(ALmodulatorState, ALeffectState, effect); - ALmodulatorState_Destroy(state); + ALmodulatorState_Destruct(state); free(state); } diff --git a/Alc/alcReverb.c b/Alc/alcReverb.c index b3de2fad..e7dad6bb 100644 --- a/Alc/alcReverb.c +++ b/Alc/alcReverb.c @@ -1178,7 +1178,7 @@ static ALvoid ALreverbState_Update(ALreverbState *State, ALCdevice *Device, cons // This destroys the reverb state. It should be called only when the effect // slot has a different (or no) effect loaded over the reverb effect. -static ALvoid ALreverbState_Destroy(ALreverbState *State) +static ALvoid ALreverbState_Destruct(ALreverbState *State) { free(State->SampleBuffer); State->SampleBuffer = NULL; @@ -1287,7 +1287,7 @@ static ALeffectState *ALreverbStateFactory_create(void) static ALvoid ALreverbStateFactory_destroy(ALeffectState *effect) { ALreverbState *state = STATIC_UPCAST(ALreverbState, ALeffectState, effect); - ALreverbState_Destroy(state); + ALreverbState_Destruct(state); free(state); } |