diff options
author | Chris Robinson <[email protected]> | 2007-12-17 17:08:44 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2007-12-17 17:08:44 -0800 |
commit | 91d214d7130a5467ec7bb2860b2da3477998d12b (patch) | |
tree | 3c3911d5139c78c30adafdfd9619c39ee7bb4d89 /OpenAL32/alFilter.c | |
parent | 635f673b95e30d4681c47792a58a2b0c6b69ea9f (diff) |
Release left over filters on close
Diffstat (limited to 'OpenAL32/alFilter.c')
-rw-r--r-- | OpenAL32/alFilter.c | 20 |
1 files changed, 20 insertions, 0 deletions
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; |