aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-05-18 17:54:45 -0700
committerChris Robinson <[email protected]>2010-05-18 17:54:45 -0700
commit2d46a1001e5ff81276666cb7eec292396710122d (patch)
tree7cedecfb8dc9b258b42a87c9f7ba457033e43ee4 /Alc
parent4edd7fe6476dc83fae162ab694984b17924968c3 (diff)
Use a map for the filter list
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 3f9c6006..ae568b2b 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1933,6 +1933,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName)
InitUIntMap(&device->BufferMap);
InitUIntMap(&device->EffectMap);
+ InitUIntMap(&device->FilterMap);
//Set output format
device->Frequency = GetConfigValueInt(NULL, "frequency", SWMIXER_OUTPUT_RATE);
@@ -2062,13 +2063,15 @@ ALC_API ALCboolean ALC_APIENTRY alcCloseDevice(ALCdevice *pDevice)
}
ResetUIntMap(&pDevice->EffectMap);
- if(pDevice->FilterCount > 0)
+ if(pDevice->FilterMap.size > 0)
{
#ifdef _DEBUG
- AL_PRINT("alcCloseDevice(): deleting %d Filter(s)\n", pDevice->FilterCount);
+ AL_PRINT("alcCloseDevice(): deleting %d Filter(s)\n", pDevice->FilterMap.size);
#endif
ReleaseALFilters(pDevice);
}
+ ResetUIntMap(&pDevice->FilterMap);
+
if(pDevice->DatabufferCount > 0)
{
#ifdef _DEBUG