aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alSource.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-02-04 00:01:12 -0800
committerChris Robinson <[email protected]>2018-02-04 00:01:12 -0800
commit9b878c64f9ec83adc4886db553ca184952ff50b4 (patch)
treedb4df8b93f71ac2f0887d803f98314d8994011ea /OpenAL32/alSource.c
parent1f61472e77faa0b57231b19236272d3e4d67fbc0 (diff)
Make the Connected state atomic
Also don't send the Disconnected event more than once.
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r--OpenAL32/alSource.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index c20226ca..8c8b2149 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -2518,7 +2518,7 @@ AL_API ALvoid AL_APIENTRY alSourcePlayv(ALsizei n, const ALuint *sources)
device = context->Device;
ALCdevice_Lock(device);
/* If the device is disconnected, go right to stopped. */
- if(!device->Connected)
+ if(!ATOMIC_LOAD(&device->Connected, almemory_order_acquire))
{
for(i = 0;i < n;i++)
{