diff options
author | Chris Robinson <[email protected]> | 2009-08-15 09:14:08 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-08-15 09:14:08 -0700 |
commit | 43067ed2b8d4ab9c3f46b8ee002d6c3f6480cc4f (patch) | |
tree | c83c89f3a37a468f18d8aa533b97ca8027fa96f3 /Alc/ALc.c | |
parent | 4e4c9aef1581fbec81294f20e2466d9d63e26ad8 (diff) |
Store the buffer list in the device
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r-- | Alc/ALc.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -216,7 +216,6 @@ BOOL APIENTRY DllMain(HANDLE hModule,DWORD ul_reason_for_call,LPVOID lpReserved) if(!init_done) break; ReleaseALC(); - ReleaseALBuffers(); ReleaseALEffects(); ReleaseALFilters(); FreeALConfig(); @@ -236,7 +235,6 @@ static void my_deinit() once = AL_TRUE; ReleaseALC(); - ReleaseALBuffers(); ReleaseALEffects(); ReleaseALFilters(); FreeALConfig(); @@ -1371,6 +1369,14 @@ ALCAPI ALCboolean ALCAPIENTRY alcCloseDevice(ALCdevice *pDevice) } ALCdevice_ClosePlayback(pDevice); + if(pDevice->BufferCount > 0) + { +#ifdef _DEBUG + AL_PRINT("alcCloseDevice(): deleting %d Buffer(s)\n", pDevice->BufferCount); +#endif + ReleaseALBuffers(pDevice); + } + //Release device structure memset(pDevice, 0, sizeof(ALCdevice)); free(pDevice); |