aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-02-11 16:58:34 -0800
committerChris Robinson <[email protected]>2018-02-11 16:58:34 -0800
commit494e9fd61d1a4ca98bb314a6615e720556519a95 (patch)
tree80ffae79bd132eee9b1ff3fefc2b34b4f2f520e8
parentb11e31fbfd6744a6d938ebb4a0e85c173386322a (diff)
Don't asynchronously modify the source on disconnect
-rw-r--r--Alc/ALu.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index a3de456b..0f6c447e 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -1926,18 +1926,10 @@ void aluHandleDisconnect(ALCdevice *device, const char *msg, ...)
for(i = 0;i < ctx->VoiceCount;i++)
{
ALvoice *voice = ctx->Voices[i];
- ALsource *source;
- source = ATOMIC_EXCHANGE_PTR(&voice->Source, NULL, almemory_order_acq_rel);
+ ATOMIC_STORE(&voice->Source, NULL, almemory_order_relaxed);
ATOMIC_STORE(&voice->Playing, false, almemory_order_release);
-
- if(source)
- {
- ALenum playing = AL_PLAYING;
- (void)(ATOMIC_COMPARE_EXCHANGE_STRONG_SEQ(&source->state, &playing, AL_STOPPED));
- }
}
- ctx->VoiceCount = 0;
ctx = ctx->next;
}