aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index d083825b..f8eda9a5 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -2106,11 +2106,22 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
{
ALvoice *voice = &context->Voices[pos];
ALsource *source = voice->Source;
+ ALbufferlistitem *BufferListItem;
- if(source)
+ if(!source)
+ continue;
+
+ BufferListItem = ATOMIC_LOAD(&source->queue);
+ while(BufferListItem != NULL)
{
- ATOMIC_STORE(&source->NeedsUpdate, AL_FALSE);
- voice->Update(voice, source, context);
+ ALbuffer *buffer;
+ if((buffer=BufferListItem->buffer) != NULL)
+ {
+ ATOMIC_STORE(&source->NeedsUpdate, AL_FALSE);
+ voice->Update(voice, source, buffer, context);
+ break;
+ }
+ BufferListItem = BufferListItem->next;
}
}