diff options
author | Chris Robinson <[email protected]> | 2011-08-21 00:49:04 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-08-21 00:49:04 -0700 |
commit | 858592832f7adf39dd1983ff72ebeda75cc4dd16 (patch) | |
tree | 1c6c4b363cd1dbb2bccdf00fe30cb169fdd1331a /OpenAL32/alState.c | |
parent | a97211b5724a4d31fb9dff93a62d941d55cbd041 (diff) |
Defer source offset changes requested by the app
Diffstat (limited to 'OpenAL32/alState.c')
-rw-r--r-- | OpenAL32/alState.c | 11 |
1 files changed, 7 insertions, 4 deletions
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); } } |