aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-08-15 09:14:08 -0700
committerChris Robinson <[email protected]>2009-08-15 09:14:08 -0700
commit43067ed2b8d4ab9c3f46b8ee002d6c3f6480cc4f (patch)
treec83c89f3a37a468f18d8aa533b97ca8027fa96f3 /Alc
parent4e4c9aef1581fbec81294f20e2466d9d63e26ad8 (diff)
Store the buffer list in the device
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index fbabe468..492bed92 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -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);