From 858592832f7adf39dd1983ff72ebeda75cc4dd16 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 21 Aug 2011 00:49:04 -0700 Subject: Defer source offset changes requested by the app --- OpenAL32/alState.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'OpenAL32/alState.c') diff --git a/OpenAL32/alState.c b/OpenAL32/alState.c index bb500bf5..38952100 100644 --- a/OpenAL32/alState.c +++ b/OpenAL32/alState.c @@ -599,13 +599,16 @@ AL_API ALvoid AL_APIENTRY alProcessUpdatesSOFT(void) for(pos = 0;pos < Context->SourceMap.size;pos++) { - ALsource *src = Context->SourceMap.array[pos].value; + ALsource *Source = Context->SourceMap.array[pos].value; ALenum new_state; - new_state = src->new_state; - src->new_state = AL_NONE; + if(Source->lOffset != -1) + ApplyOffset(Source); + + new_state = Source->new_state; + Source->new_state = AL_NONE; if(new_state) - SetSourceState(src, Context, new_state); + SetSourceState(Source, Context, new_state); } } -- cgit v1.2.3