diff options
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALc.c | 2 | ||||
-rw-r--r-- | Alc/ALu.c | 9 |
2 files changed, 9 insertions, 2 deletions
@@ -1448,6 +1448,7 @@ static ALCboolean UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) ALsource_Update(source, context); source->NeedsUpdate = AL_FALSE; } + context->UpdateSources = AL_FALSE; } UnlockDevice(device); @@ -1540,6 +1541,7 @@ static ALvoid InitContext(ALCcontext *pContext) //Validate pContext pContext->LastError = AL_NO_ERROR; + pContext->UpdateSources = AL_FALSE; pContext->Suspended = AL_FALSE; pContext->ActiveSourceCount = 0; InitUIntMap(&pContext->SourceMap); @@ -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); |