diff options
author | Chris Robinson <[email protected]> | 2010-06-03 19:35:08 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2010-06-03 19:35:08 -0700 |
commit | 43dadcd9e437968f2913f7f066e0516eee4cbde0 (patch) | |
tree | 3d090ceb96e36c2ed565004c3a685b4877dd9ae2 /Alc/ALc.c | |
parent | 90db244b5f0c25ef1c24639210bbadd3be6ef81a (diff) |
Use a UIntMap for the Databuffers
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r-- | Alc/ALc.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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; |