summaryrefslogtreecommitdiffstats
path: root/OpenAL32/alAuxEffectSlot.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-05-01 19:59:41 -0700
committerChris Robinson <[email protected]>2010-05-01 19:59:41 -0700
commit0378422fcb4badba0a0dcdce503dcbe9d253f9a8 (patch)
treeb7bf68507f0b8fa7716c821db445c88df060af29 /OpenAL32/alAuxEffectSlot.c
parent0760415d08031eea36abf193537c8c8a120cb2e6 (diff)
Use a map to store sources and buffers
And do a lookup using a binary search instead of linear
Diffstat (limited to 'OpenAL32/alAuxEffectSlot.c')
-rw-r--r--OpenAL32/alAuxEffectSlot.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenAL32/alAuxEffectSlot.c b/OpenAL32/alAuxEffectSlot.c
index 90e28431..0ff10ab2 100644
--- a/OpenAL32/alAuxEffectSlot.c
+++ b/OpenAL32/alAuxEffectSlot.c
@@ -232,9 +232,10 @@ AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSloti(ALuint effectslot, ALenum param
// sending parameters
if(updateSources)
{
- ALsource *source = Context->SourceList;
- while(source)
+ ALsizei pos;
+ for(pos = 0;pos < Context->SourceMap.size;pos++)
{
+ ALsource *source = Context->SourceMap.array[pos].value;
ALuint i;
for(i = 0;i < MAX_SENDS;i++)
{
@@ -244,7 +245,6 @@ AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSloti(ALuint effectslot, ALenum param
source->NeedsUpdate = AL_TRUE;
break;
}
- source = source->next;
}
}