aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alFilter.h2
-rw-r--r--OpenAL32/OpenAL32.c2
-rw-r--r--OpenAL32/alFilter.c20
3 files changed, 24 insertions, 0 deletions
diff --git a/OpenAL32/Include/alFilter.h b/OpenAL32/Include/alFilter.h
index f46f7364..b1a61d59 100644
--- a/OpenAL32/Include/alFilter.h
+++ b/OpenAL32/Include/alFilter.h
@@ -39,6 +39,8 @@ AL_API ALvoid AL_APIENTRY alGetFilteriv(ALuint filter, ALenum param, ALint *piVa
AL_API ALvoid AL_APIENTRY alGetFilterf(ALuint filter, ALenum param, ALfloat *pflValue);
AL_API ALvoid AL_APIENTRY alGetFilterfv(ALuint filter, ALenum param, ALfloat *pflValues);
+ALvoid ReleaseALFilters(ALvoid);
+
#ifdef __cplusplus
}
#endif
diff --git a/OpenAL32/OpenAL32.c b/OpenAL32/OpenAL32.c
index b638d945..db317800 100644
--- a/OpenAL32/OpenAL32.c
+++ b/OpenAL32/OpenAL32.c
@@ -20,6 +20,7 @@
#include "alMain.h"
#include "alBuffer.h"
+#include "alFilter.h"
#include "alThunk.h"
CRITICAL_SECTION g_mutex;
@@ -55,6 +56,7 @@ static void my_deinit()
once = AL_TRUE;
ReleaseALBuffers();
+ ReleaseALFilters();
FreeALConfig();
ALTHUNK_EXIT();
DeleteCriticalSection(&g_mutex);
diff --git a/OpenAL32/alFilter.c b/OpenAL32/alFilter.c
index dae7dcf7..2906c703 100644
--- a/OpenAL32/alFilter.c
+++ b/OpenAL32/alFilter.c
@@ -342,6 +342,26 @@ AL_API ALvoid AL_APIENTRY alGetFilterfv(ALuint filter, ALenum param, ALfloat *pf
}
+ALvoid ReleaseALFilters(ALvoid)
+{
+#ifdef _DEBUG
+ if(g_FilterCount > 0)
+ AL_PRINT("exit() %d Filter(s) NOT deleted\n", g_FilterCount);
+#endif
+
+ while(g_FilterList)
+ {
+ ALfilter *temp = g_FilterList;
+ g_FilterList = g_FilterList->next;
+
+ // Release Buffer structure
+ memset(temp, 0, sizeof(ALfilter));
+ free(temp);
+ }
+ g_FilterCount = 0;
+}
+
+
static void InitFilterParams(ALfilter *filter, ALenum type)
{
filter->type = type;