aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-06-03 19:35:08 -0700
committerChris Robinson <[email protected]>2010-06-03 19:35:08 -0700
commit43dadcd9e437968f2913f7f066e0516eee4cbde0 (patch)
tree3d090ceb96e36c2ed565004c3a685b4877dd9ae2 /Alc/ALc.c
parent90db244b5f0c25ef1c24639210bbadd3be6ef81a (diff)
Use a UIntMap for the Databuffers
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index a7c27bad..c5704044 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1962,6 +1962,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName)
InitUIntMap(&device->BufferMap);
InitUIntMap(&device->EffectMap);
InitUIntMap(&device->FilterMap);
+ InitUIntMap(&device->DatabufferMap);
//Set output format
device->Frequency = GetConfigValueInt(NULL, "frequency", SWMIXER_OUTPUT_RATE);
@@ -2093,13 +2094,14 @@ ALC_API ALCboolean ALC_APIENTRY alcCloseDevice(ALCdevice *pDevice)
}
ResetUIntMap(&pDevice->FilterMap);
- if(pDevice->DatabufferCount > 0)
+ if(pDevice->DatabufferMap.size > 0)
{
#ifdef _DEBUG
- AL_PRINT("alcCloseDevice(): deleting %d Databuffer(s)\n", pDevice->DatabufferCount);
+ AL_PRINT("alcCloseDevice(): deleting %d Databuffer(s)\n", pDevice->DatabufferMap.size);
#endif
ReleaseALDatabuffers(pDevice);
}
+ ResetUIntMap(&pDevice->DatabufferMap);
free(pDevice->Bs2b);
pDevice->Bs2b = NULL;