aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/effects')
-rw-r--r--Alc/effects/chorus.c11
-rw-r--r--Alc/effects/dedicated.c11
-rw-r--r--Alc/effects/distortion.c11
-rw-r--r--Alc/effects/echo.c11
-rw-r--r--Alc/effects/equalizer.c11
-rw-r--r--Alc/effects/flanger.c11
-rw-r--r--Alc/effects/modulator.c11
-rw-r--r--Alc/effects/null.c16
-rw-r--r--Alc/effects/reverb.c11
9 files changed, 19 insertions, 85 deletions
diff --git a/Alc/effects/chorus.c b/Alc/effects/chorus.c
index c74bf0b5..22241af5 100644
--- a/Alc/effects/chorus.c
+++ b/Alc/effects/chorus.c
@@ -243,9 +243,9 @@ static ALvoid ALchorusState_Process(ALchorusState *state, ALuint SamplesToDo, co
ProcessSinusoid(state, SamplesToDo, SamplesIn, SamplesOut);
}
-static ALeffectStateFactory *ALchorusState_getCreator(void)
+static void ALchorusState_Delete(ALchorusState *state)
{
- return STATIC_CAST(ALeffectStateFactory, &ChorusFactory);
+ free(state);
}
DEFINE_ALEFFECTSTATE_VTABLE(ALchorusState);
@@ -267,13 +267,6 @@ static ALeffectState *ALchorusStateFactory_create(void)
return STATIC_CAST(ALeffectState, state);
}
-static ALvoid ALchorusStateFactory_destroy(ALeffectState *effect)
-{
- ALchorusState *state = STATIC_UPCAST(ALchorusState, ALeffectState, effect);
- ALchorusState_Destruct(state);
- free(state);
-}
-
DEFINE_ALEFFECTSTATEFACTORY_VTABLE(ALchorusStateFactory);
diff --git a/Alc/effects/dedicated.c b/Alc/effects/dedicated.c
index 6b3ce1ae..184fe292 100644
--- a/Alc/effects/dedicated.c
+++ b/Alc/effects/dedicated.c
@@ -85,9 +85,9 @@ static ALvoid ALdedicatedState_Process(ALdedicatedState *state, ALuint SamplesTo
}
}
-static ALeffectStateFactory *ALdedicatedState_getCreator(void)
+static void ALdedicatedState_Delete(ALdedicatedState *state)
{
- return STATIC_CAST(ALeffectStateFactory, &DedicatedFactory);
+ free(state);
}
DEFINE_ALEFFECTSTATE_VTABLE(ALdedicatedState);
@@ -108,13 +108,6 @@ ALeffectState *ALdedicatedStateFactory_create(void)
return STATIC_CAST(ALeffectState, state);
}
-static ALvoid ALdedicatedStateFactory_destroy(ALeffectState *effect)
-{
- ALdedicatedState *state = STATIC_UPCAST(ALdedicatedState, ALeffectState, effect);
- ALdedicatedState_Destruct(state);
- free(state);
-}
-
DEFINE_ALEFFECTSTATEFACTORY_VTABLE(ALdedicatedStateFactory);
diff --git a/Alc/effects/distortion.c b/Alc/effects/distortion.c
index e92fb9a8..cc6669af 100644
--- a/Alc/effects/distortion.c
+++ b/Alc/effects/distortion.c
@@ -234,9 +234,9 @@ static ALvoid ALdistortionState_Process(ALdistortionState *state, ALuint Samples
}
}
-static ALeffectStateFactory *ALdistortionState_getCreator(void)
+static void ALdistortionState_Delete(ALdistortionState *state)
{
- return STATIC_CAST(ALeffectStateFactory, &DistortionFactory);
+ free(state);
}
DEFINE_ALEFFECTSTATE_VTABLE(ALdistortionState);
@@ -263,13 +263,6 @@ static ALeffectState *ALdistortionStateFactory_create(void)
return STATIC_CAST(ALeffectState, state);
}
-static ALvoid ALdistortionStateFactory_destroy(ALeffectState *effect)
-{
- ALdistortionState *state = STATIC_UPCAST(ALdistortionState, ALeffectState, effect);
- ALdistortionState_Destruct(state);
- free(state);
-}
-
DEFINE_ALEFFECTSTATEFACTORY_VTABLE(ALdistortionStateFactory);
diff --git a/Alc/effects/echo.c b/Alc/effects/echo.c
index 8f679c41..533461ac 100644
--- a/Alc/effects/echo.c
+++ b/Alc/effects/echo.c
@@ -175,9 +175,9 @@ static ALvoid ALechoState_Process(ALechoState *state, ALuint SamplesToDo, const
state->Offset = offset;
}
-static ALeffectStateFactory *ALechoState_getCreator(void)
+static void ALechoState_Delete(ALechoState *state)
{
- return STATIC_CAST(ALeffectStateFactory, &EchoFactory);
+ free(state);
}
DEFINE_ALEFFECTSTATE_VTABLE(ALechoState);
@@ -205,13 +205,6 @@ ALeffectState *ALechoStateFactory_create(void)
return STATIC_CAST(ALeffectState, state);
}
-static ALvoid ALechoStateFactory_destroy(ALeffectState *effect)
-{
- ALechoState *state = STATIC_UPCAST(ALechoState, ALeffectState, effect);
- ALechoState_Destruct(state);
- free(state);
-}
-
DEFINE_ALEFFECTSTATEFACTORY_VTABLE(ALechoStateFactory);
diff --git a/Alc/effects/equalizer.c b/Alc/effects/equalizer.c
index adcd40f4..3d5f35d5 100644
--- a/Alc/effects/equalizer.c
+++ b/Alc/effects/equalizer.c
@@ -270,9 +270,9 @@ static ALvoid ALequalizerState_Process(ALequalizerState *state, ALuint SamplesTo
}
}
-static ALeffectStateFactory *ALequalizerState_getCreator(void)
+static void ALequalizerState_Delete(ALequalizerState *state)
{
- return STATIC_CAST(ALeffectStateFactory, &EqualizerFactory);
+ free(state);
}
DEFINE_ALEFFECTSTATE_VTABLE(ALequalizerState);
@@ -305,13 +305,6 @@ ALeffectState *ALequalizerStateFactory_create(void)
return STATIC_CAST(ALeffectState, state);
}
-static ALvoid ALequalizerStateFactory_destroy(ALeffectState *effect)
-{
- ALequalizerState *state = STATIC_UPCAST(ALequalizerState, ALeffectState, effect);
- ALequalizerState_Destruct(state);
- free(state);
-}
-
DEFINE_ALEFFECTSTATEFACTORY_VTABLE(ALequalizerStateFactory);
diff --git a/Alc/effects/flanger.c b/Alc/effects/flanger.c
index de98a06d..12e16de2 100644
--- a/Alc/effects/flanger.c
+++ b/Alc/effects/flanger.c
@@ -243,9 +243,9 @@ static ALvoid ALflangerState_Process(ALflangerState *state, ALuint SamplesToDo,
ProcessSinusoid(state, SamplesToDo, SamplesIn, SamplesOut);
}
-static ALeffectStateFactory *ALflangerState_getCreator(void)
+static void ALflangerState_Delete(ALflangerState *state)
{
- return STATIC_CAST(ALeffectStateFactory, &FlangerFactory);
+ free(state);
}
DEFINE_ALEFFECTSTATE_VTABLE(ALflangerState);
@@ -267,13 +267,6 @@ ALeffectState *ALflangerStateFactory_create(void)
return STATIC_CAST(ALeffectState, state);
}
-static ALvoid ALflangerStateFactory_destroy(ALeffectState *effect)
-{
- ALflangerState *state = STATIC_UPCAST(ALflangerState, ALeffectState, effect);
- ALflangerState_Destruct(state);
- free(state);
-}
-
DEFINE_ALEFFECTSTATEFACTORY_VTABLE(ALflangerStateFactory);
diff --git a/Alc/effects/modulator.c b/Alc/effects/modulator.c
index e48a6d94..3f9ff8a5 100644
--- a/Alc/effects/modulator.c
+++ b/Alc/effects/modulator.c
@@ -197,9 +197,9 @@ static ALvoid ALmodulatorState_Process(ALmodulatorState *state, ALuint SamplesTo
}
}
-static ALeffectStateFactory *ALmodulatorState_getCreator(void)
+static void ALmodulatorState_Delete(ALmodulatorState *state)
{
- return STATIC_CAST(ALeffectStateFactory, &ModulatorFactory);
+ free(state);
}
DEFINE_ALEFFECTSTATE_VTABLE(ALmodulatorState);
@@ -222,13 +222,6 @@ static ALeffectState *ALmodulatorStateFactory_create(void)
return STATIC_CAST(ALeffectState, state);
}
-static ALvoid ALmodulatorStateFactory_destroy(ALeffectState *effect)
-{
- ALmodulatorState *state = STATIC_UPCAST(ALmodulatorState, ALeffectState, effect);
- ALmodulatorState_Destruct(state);
- free(state);
-}
-
DEFINE_ALEFFECTSTATEFACTORY_VTABLE(ALmodulatorStateFactory);
diff --git a/Alc/effects/null.c b/Alc/effects/null.c
index 76d650da..3d617b64 100644
--- a/Alc/effects/null.c
+++ b/Alc/effects/null.c
@@ -60,12 +60,10 @@ static ALvoid ALnullState_Process(ALnullState *state, ALuint samplesToDo, const
(void)samplesOut;
}
-/* This returns the ALeffectStateFactory that creates these ALeffectState
- * object types.
- */
-static ALeffectStateFactory *ALnullState_getCreator(void)
+/* This frees the memory used by the object, after it has been destructed. */
+static void ALnullState_Delete(ALnullState *state)
{
- return STATIC_CAST(ALeffectStateFactory, &NullFactory);
+ free(state);
}
/* Define the forwards and the ALeffectState vtable for this type. */
@@ -85,14 +83,6 @@ ALeffectState *ALnullStateFactory_create(void)
return STATIC_CAST(ALeffectState, state);
}
-/* Destroys (destructs and frees) the ALeffectState. */
-static ALvoid ALnullStateFactory_destroy(ALeffectState *effect)
-{
- ALnullState *state = STATIC_UPCAST(ALnullState, ALeffectState, effect);
- ALnullState_Destruct(state);
- free(state);
-}
-
/* Define the ALeffectStateFactory vtable for this type. */
DEFINE_ALEFFECTSTATEFACTORY_VTABLE(ALnullStateFactory);
diff --git a/Alc/effects/reverb.c b/Alc/effects/reverb.c
index b634dd1c..2421225d 100644
--- a/Alc/effects/reverb.c
+++ b/Alc/effects/reverb.c
@@ -1174,9 +1174,9 @@ static ALvoid ALreverbState_Destruct(ALreverbState *State)
State->SampleBuffer = NULL;
}
-static ALeffectStateFactory *ALreverbState_getCreator(void)
+static void ALreverbState_Delete(ALreverbState *state)
{
- return STATIC_CAST(ALeffectStateFactory, &ReverbFactory);
+ free(state);
}
DEFINE_ALEFFECTSTATE_VTABLE(ALreverbState);
@@ -1274,13 +1274,6 @@ static ALeffectState *ALreverbStateFactory_create(void)
return STATIC_CAST(ALeffectState, state);
}
-static ALvoid ALreverbStateFactory_destroy(ALeffectState *effect)
-{
- ALreverbState *state = STATIC_UPCAST(ALreverbState, ALeffectState, effect);
- ALreverbState_Destruct(state);
- free(state);
-}
-
DEFINE_ALEFFECTSTATEFACTORY_VTABLE(ALreverbStateFactory);