diff options
author | Chris Robinson <[email protected]> | 2017-02-13 21:18:18 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-02-13 21:18:18 -0800 |
commit | 0d19a209014582f1e77ab3b927dfb1af6c307d66 (patch) | |
tree | 38d5b06d2003a23175522411bfeeffb8fc252f7a /Alc/ALc.c | |
parent | 0324712540f88d18f1fa8f18f7a72da06af00d75 (diff) |
Make the source state atomic
Since it's modified by the mixer when playback is ended, a plain struct member
isn't safe.
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r-- | Alc/ALc.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -1697,8 +1697,7 @@ void ALCcontext_ProcessUpdates(ALCcontext *context) ALsource *Source = context->SourceMap.values[pos]; ALenum new_state; - if((Source->state == AL_PLAYING || Source->state == AL_PAUSED) && - Source->OffsetType != AL_NONE) + if(Source->OffsetType != AL_NONE && IsPlayingOrPaused(Source)) { WriteLock(&Source->queue_lock); ApplyOffset(Source); |