aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-05-18 17:41:06 -0700
committerChris Robinson <[email protected]>2010-05-18 17:41:06 -0700
commit4edd7fe6476dc83fae162ab694984b17924968c3 (patch)
tree2dbb88d8498d10d4dfb2b34dc6123e273be487d9 /Alc/ALc.c
parentad5dfab428f9eea071cb0c17808d672c84d78ebb (diff)
Use a map for the effects list
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index cd791c38..3f9c6006 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1932,6 +1932,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName)
device->NumContexts = 0;
InitUIntMap(&device->BufferMap);
+ InitUIntMap(&device->EffectMap);
//Set output format
device->Frequency = GetConfigValueInt(NULL, "frequency", SWMIXER_OUTPUT_RATE);
@@ -2052,13 +2053,15 @@ ALC_API ALCboolean ALC_APIENTRY alcCloseDevice(ALCdevice *pDevice)
}
ResetUIntMap(&pDevice->BufferMap);
- if(pDevice->EffectCount > 0)
+ if(pDevice->EffectMap.size > 0)
{
#ifdef _DEBUG
- AL_PRINT("alcCloseDevice(): deleting %d Effect(s)\n", pDevice->EffectCount);
+ AL_PRINT("alcCloseDevice(): deleting %d Effect(s)\n", pDevice->EffectMap.size);
#endif
ReleaseALEffects(pDevice);
}
+ ResetUIntMap(&pDevice->EffectMap);
+
if(pDevice->FilterCount > 0)
{
#ifdef _DEBUG