aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alAuxEffectSlot.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2008-07-25 19:31:12 -0700
committerChris Robinson <[email protected]>2008-07-25 19:31:12 -0700
commitc7e49c9f5735df52d4e847529ae9cb23027547e7 (patch)
tree91f78fed57422925b198ed2f20e2ba44b4dbf242 /OpenAL32/alAuxEffectSlot.c
parente2ed8ff2bfd1521f849038c400c054b0b6e8a5b0 (diff)
Implement yet another low-pass filter
This one using the Butterworth IIR filter design
Diffstat (limited to 'OpenAL32/alAuxEffectSlot.c')
-rw-r--r--OpenAL32/alAuxEffectSlot.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/OpenAL32/alAuxEffectSlot.c b/OpenAL32/alAuxEffectSlot.c
index 23765cf6..e05448cd 100644
--- a/OpenAL32/alAuxEffectSlot.c
+++ b/OpenAL32/alAuxEffectSlot.c
@@ -71,6 +71,8 @@ AL_API ALvoid AL_APIENTRY alGenAuxiliaryEffectSlots(ALsizei n, ALuint *effectslo
break;
}
+ InitLowPassFilter(Context, &(*list)->iirFilter);
+
(*list)->Gain = 1.0;
(*list)->AuxSendAuto = AL_TRUE;
(*list)->refcount = 0;
@@ -139,6 +141,9 @@ AL_API ALvoid AL_APIENTRY alDeleteAuxiliaryEffectSlots(ALsizei n, ALuint *effect
ALAuxiliaryEffectSlot = ((ALeffectslot*)ALTHUNK_LOOKUPENTRY(effectslots[i]));
+ free(ALAuxiliaryEffectSlot->iirFilter.coef);
+ free(ALAuxiliaryEffectSlot->iirFilter.history);
+
// Remove Source from list of Sources
list = &Context->AuxiliaryEffectSlot;
while(*list && *list != ALAuxiliaryEffectSlot)