diff options
author | Chris Robinson <[email protected]> | 2014-05-14 02:47:07 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-05-14 02:47:07 -0700 |
commit | 1d2504d12e996a4c1e8fe9785901db9a9e3b4d7c (patch) | |
tree | 51895ba97192cee1fccab44a838e4fa43d81a984 /OpenAL32/alSource.c | |
parent | 4454ae25c753388c529b937ae2ce0f47f06d16c4 (diff) |
Make RefCount a non-integer type
It should only be accessed through the appropriate functions to ensure proper
atomicity.
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r-- | OpenAL32/alSource.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index 167208e5..78ccef9a 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -2230,16 +2230,16 @@ AL_API ALvoid AL_APIENTRY alSourceUnqueueBuffers(ALuint src, ALsizei nb, ALuint if(BufferList) { ALCdevice *device = context->Device; - RefCount count; + uint count; /* Cut the new head's link back to the old body. The mixer is robust * enough to handle the link back going away. Once the active mix (if * any) is complete, it's safe to finish cutting the old tail from the * new head. */ BufferList = ExchangePtr((XchgPtr*)&BufferList->prev, NULL); - if(((count=device->MixCount)&1) != 0) + if(((count=ReadRef(&device->MixCount))&1) != 0) { - while(count == device->MixCount) + while(count == ReadRef(&device->MixCount)) althrd_yield(); } BufferList->next = NULL; |