aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alState.c
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32/alState.c')
-rw-r--r--OpenAL32/alState.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/OpenAL32/alState.c b/OpenAL32/alState.c
index dc88263e..bbd808eb 100644
--- a/OpenAL32/alState.c
+++ b/OpenAL32/alState.c
@@ -584,8 +584,7 @@ AL_API ALvoid AL_APIENTRY alDeferUpdatesSOFT(void)
{
ALboolean UpdateSources;
ALsource **src, **src_end;
- ALeffectslot *ALEffectSlot;
- ALsizei e;
+ ALeffectslot **slot, **slot_end;
LockContext(Context);
Context->DeferUpdates = AL_TRUE;
@@ -610,14 +609,15 @@ AL_API ALvoid AL_APIENTRY alDeferUpdatesSOFT(void)
src++;
}
- LockUIntMapRead(&Context->EffectSlotMap);
- for(e = 0;e < Context->EffectSlotMap.size;e++)
+ slot = Context->ActiveEffectSlots;
+ slot_end = slot + Context->ActiveEffectSlotCount;
+ while(slot != slot_end)
{
- ALEffectSlot = Context->EffectSlotMap.array[e].value;
- if(ExchangeInt(&ALEffectSlot->NeedsUpdate, AL_FALSE))
- ALEffect_Update(ALEffectSlot->EffectState, Context, ALEffectSlot);
+ if(ExchangeInt(&(*slot)->NeedsUpdate, AL_FALSE))
+ ALEffect_Update((*slot)->EffectState, Context, *slot);
+ slot++;
}
- UnlockUIntMapRead(&Context->EffectSlotMap);
+
UnlockContext(Context);
}