diff options
author | Chris Robinson <[email protected]> | 2011-08-30 23:33:01 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-08-30 23:33:01 -0700 |
commit | d7bd9c7559b9dec79bb5552d75326b685a6a64f5 (patch) | |
tree | b41cbc967cc45003c14053f2b524d3935656adde /OpenAL32/alState.c | |
parent | 9fb91f70aafae4bbc745f9cf52d027cd2b07a52a (diff) |
Use the active effect slot list for pending updates in alDeferUpdatesSOFT
Diffstat (limited to 'OpenAL32/alState.c')
-rw-r--r-- | OpenAL32/alState.c | 16 |
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); } |