Use the active effect slot list for pending updates in alDeferUpdatesSOFT

This commit is contained in:
Chris Robinson
2011-08-30 23:33:01 -07:00
parent 9fb91f70aa
commit d7bd9c7559
+8 -8
View File
@@ -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);
}