summaryrefslogtreecommitdiffstats
path: root/OpenAL32/alSource.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/alSource.c
parente2ed8ff2bfd1521f849038c400c054b0b6e8a5b0 (diff)
Implement yet another low-pass filter
This one using the Butterworth IIR filter design
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r--OpenAL32/alSource.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index 89212933..1960b676 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -75,6 +75,8 @@ ALAPI ALvoid ALAPIENTRY alGenSources(ALsizei n,ALuint *sources)
break;
}
+ InitLowPassFilter(Context, &(*list)->iirFilter);
+
sources[i] = (ALuint)ALTHUNK_ADDENTRY(*list);
(*list)->source = sources[i];
@@ -179,6 +181,9 @@ ALAPI ALvoid ALAPIENTRY alDeleteSources(ALsizei n, const ALuint *sources)
ALSource->Send[j].Slot = NULL;
}
+ free(ALSource->iirFilter.coef);
+ free(ALSource->iirFilter.history);
+
// Decrement Source count
Context->SourceCount--;