summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-07-11 01:13:58 -0700
committerChris Robinson <[email protected]>2011-07-11 01:13:58 -0700
commit52c78194b342dd401419374181fded95dcaa737d (patch)
tree001bfdaab1a459e660fb4335a4f8e981007f739f
parent58466a304b24e86c507f16d07fdbec051d2ada14 (diff)
Update the context when an auxiliary slot is modified
-rw-r--r--OpenAL32/alAuxEffectSlot.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/OpenAL32/alAuxEffectSlot.c b/OpenAL32/alAuxEffectSlot.c
index c745be51..e442fa2c 100644
--- a/OpenAL32/alAuxEffectSlot.c
+++ b/OpenAL32/alAuxEffectSlot.c
@@ -175,7 +175,6 @@ AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSloti(ALuint effectslot, ALenum param
{
ALCdevice *Device;
ALCcontext *Context;
- ALboolean updateSources = AL_FALSE;
ALeffectslot *EffectSlot;
Context = GetLockedContext();
@@ -193,7 +192,7 @@ AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSloti(ALuint effectslot, ALenum param
(effect=LookupEffect(Device->EffectMap, iValue)) != NULL)
{
InitializeEffect(Context, EffectSlot, effect);
- updateSources = AL_TRUE;
+ Context->UpdateSources = AL_TRUE;
}
else
alSetError(Context, AL_INVALID_VALUE);
@@ -203,7 +202,7 @@ AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSloti(ALuint effectslot, ALenum param
if(iValue == AL_TRUE || iValue == AL_FALSE)
{
EffectSlot->AuxSendAuto = iValue;
- updateSources = AL_TRUE;
+ Context->UpdateSources = AL_TRUE;
}
else
alSetError(Context, AL_INVALID_VALUE);
@@ -217,26 +216,6 @@ AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSloti(ALuint effectslot, ALenum param
else
alSetError(Context, AL_INVALID_NAME);
- // Force updating the sources that use this slot, since it affects the
- // sending parameters
- if(updateSources)
- {
- ALsizei pos;
- for(pos = 0;pos < Context->SourceMap.size;pos++)
- {
- ALsource *source = Context->SourceMap.array[pos].value;
- ALuint i;
- for(i = 0;i < Device->NumAuxSends;i++)
- {
- if(!source->Send[i].Slot ||
- source->Send[i].Slot->effectslot != effectslot)
- continue;
- source->NeedsUpdate = AL_TRUE;
- break;
- }
- }
- }
-
UnlockContext(Context);
}