From 6e6a30679e54f83faa0e2149df3f638de1466396 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 21 Feb 2020 04:55:04 -0800 Subject: 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. --- al/source.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'al/source.cpp') 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(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; -- cgit v1.2.3