BOOL APIENTRY DllMain(HANDLE hModule,DWORD ul_reason_for_call,LPVOID lpReserved) { (void)lpReserved; // Perform actions based on the reason for calling. switch(ul_reason_for_call) { case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(hModule); break; case DLL_PROCESS_DETACH: if(!init_done) break; ReleaseALC(); ReleaseALBuffers(); ReleaseALEffects(); ReleaseALFilters(); FreeALConfig(); ALTHUNK_EXIT(); DeleteCriticalSection(&g_csMutex); break; } return TRUE; }
static void my_deinit() { static ALenum once = AL_FALSE; if(once || !init_done) return; once = AL_TRUE; ReleaseALC(); ReleaseALBuffers(); ReleaseALEffects(); ReleaseALFilters(); FreeALConfig(); ALTHUNK_EXIT(); DeleteCriticalSection(&g_csMutex); }
static void alc_deinit(void) { int i; ReleaseALC(); for(i = 0;BackendList[i].Deinit;i++) BackendList[i].Deinit(); tls_delete(LocalContext); FreeALConfig(); ALTHUNK_EXIT(); DeleteCriticalSection(&g_csMutex); }
void MOB_FreeALConfig(void) { FreeALConfig(); }