diff options
author | Chris Robinson <[email protected]> | 2009-08-15 09:39:18 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-08-15 09:39:18 -0700 |
commit | 510ccc7f1786bffd183f5a30c7e2e3f8e8026371 (patch) | |
tree | 8e4c33cc52d872ae50eb32debfcf6119c5791f1d /Alc | |
parent | 43067ed2b8d4ab9c3f46b8ee002d6c3f6480cc4f (diff) |
Store the effect and filter lists in the device
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALc.c | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -216,8 +216,6 @@ BOOL APIENTRY DllMain(HANDLE hModule,DWORD ul_reason_for_call,LPVOID lpReserved) if(!init_done) break; ReleaseALC(); - ReleaseALEffects(); - ReleaseALFilters(); FreeALConfig(); ALTHUNK_EXIT(); DeleteCriticalSection(&g_csMutex); @@ -235,8 +233,6 @@ static void my_deinit() once = AL_TRUE; ReleaseALC(); - ReleaseALEffects(); - ReleaseALFilters(); FreeALConfig(); ALTHUNK_EXIT(); DeleteCriticalSection(&g_csMutex); @@ -1376,6 +1372,20 @@ ALCAPI ALCboolean ALCAPIENTRY alcCloseDevice(ALCdevice *pDevice) #endif ReleaseALBuffers(pDevice); } + if(pDevice->EffectCount > 0) + { +#ifdef _DEBUG + AL_PRINT("alcCloseDevice(): deleting %d Effect(s)\n", pDevice->EffectCount); +#endif + ReleaseALEffects(pDevice); + } + if(pDevice->FilterCount > 0) + { +#ifdef _DEBUG + AL_PRINT("alcCloseDevice(): deleting %d Filter(s)\n", pDevice->FilterCount); +#endif + ReleaseALFilters(pDevice); + } //Release device structure memset(pDevice, 0, sizeof(ALCdevice)); |