aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alFontsound.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-01-02 14:43:44 -0800
committerChris Robinson <[email protected]>2014-01-02 14:43:44 -0800
commitf790d0e91f425e3ea8902b462fdb42094242ca9b (patch)
treec964f69bfd4b25ca73119ce6347a28e931f92c2a /OpenAL32/alFontsound.c
parent49c17ad520d25075b7988c51705198a3cb834e93 (diff)
Use a uint map for modulators
Diffstat (limited to 'OpenAL32/alFontsound.c')
-rw-r--r--OpenAL32/alFontsound.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/OpenAL32/alFontsound.c b/OpenAL32/alFontsound.c
index b4ffb89b..6d6d323a 100644
--- a/OpenAL32/alFontsound.c
+++ b/OpenAL32/alFontsound.c
@@ -735,15 +735,15 @@ static void ALfontsound_Construct(ALfontsound *self)
self->SampleType = AL_NONE;
self->Link = NULL;
- self->Modulators = NULL;
- self->NumModulators = 0;
- self->ModulatorsMax = 0;
+ InitUIntMap(&self->ModulatorMap, ~0);
self->id = 0;
}
static void ALfontsound_Destruct(ALfontsound *self)
{
+ ALsizei i;
+
FreeThunkEntry(self->id);
self->id = 0;
@@ -751,10 +751,12 @@ static void ALfontsound_Destruct(ALfontsound *self)
DecrementRef(&self->Link->ref);
self->Link = NULL;
- free(self->Modulators);
- self->Modulators = NULL;
- self->NumModulators = 0;
- self->ModulatorsMax = 0;
+ for(i = 0;i < self->ModulatorMap.size;i++)
+ {
+ free(self->ModulatorMap.array[i].value);
+ self->ModulatorMap.array[i].value = NULL;
+ }
+ ResetUIntMap(&self->ModulatorMap);
}