From 58466a304b24e86c507f16d07fdbec051d2ada14 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 11 Jul 2011 01:05:42 -0700 Subject: Use a flag to signifiy that all sources need updating --- Alc/ALu.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Alc/ALu.c') diff --git a/Alc/ALu.c b/Alc/ALu.c index c2a2c5ea..2cd9326f 100644 --- a/Alc/ALu.c +++ b/Alc/ALu.c @@ -989,6 +989,11 @@ ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size) ctx_end = ctx + device->NumContexts; while(ctx != ctx_end) { + ALboolean UpdateSources; + + UpdateSources = (*ctx)->UpdateSources; + (*ctx)->UpdateSources = AL_FALSE; + src = (*ctx)->ActiveSources; src_end = src + (*ctx)->ActiveSourceCount; while(src != src_end) @@ -1000,10 +1005,10 @@ ALvoid aluMixData(ALCdevice *device, ALvoid *buffer, ALsizei size) continue; } - if((*src)->NeedsUpdate) + if((*src)->NeedsUpdate || UpdateSources) { - ALsource_Update(*src, *ctx); (*src)->NeedsUpdate = AL_FALSE; + ALsource_Update(*src, *ctx); } MixSource(*src, device, SamplesToDo); -- cgit v1.2.3