aboutsummaryrefslogtreecommitdiffstats
path: root/al
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-02-21 04:55:04 -0800
committerChris Robinson <[email protected]>2020-02-21 04:55:04 -0800
commit6e6a30679e54f83faa0e2149df3f638de1466396 (patch)
tree0d08695b38e10bed347998dc83b6117dc88cbbea /al
parent0694df901437568ce4699ae3c8a3e003eea0ceb7 (diff)
Set the voice's property update after the source ID
Otherwise the mixer has a chance to throw it out before realizing it's needed.
Diffstat (limited to 'al')
-rw-r--r--al/source.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/al/source.cpp b/al/source.cpp
index 3020d63a..ace69310 100644
--- a/al/source.cpp
+++ b/al/source.cpp
@@ -2777,9 +2777,6 @@ START_API_FUNC
auto vidx = static_cast<ALuint>(std::distance(context->mVoices.data(), voice));
- source->PropsClean.test_and_set(std::memory_order_acq_rel);
- UpdateSourceProps(source, voice, context.get());
-
/* A source that's not playing or paused has any offset applied when it
* starts playing.
*/
@@ -2869,6 +2866,9 @@ START_API_FUNC
}
voice->mSourceID.store(source->id, std::memory_order_release);
+ source->PropsClean.test_and_set(std::memory_order_acq_rel);
+ UpdateSourceProps(source, voice, context.get());
+
source->VoiceIdx = vidx;
source->state = AL_PLAYING;