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/alBuffer.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/alBuffer.c')
-rw-r--r-- | OpenAL32/alBuffer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c index 2d368987..12d57d61 100644 --- a/OpenAL32/alBuffer.c +++ b/OpenAL32/alBuffer.c @@ -115,7 +115,7 @@ AL_API ALvoid AL_APIENTRY alDeleteBuffers(ALsizei n, const ALuint *buffers) /* Check for valid Buffer ID */ if((ALBuf=LookupBuffer(device, buffers[i])) == NULL) SET_ERROR_AND_GOTO(context, AL_INVALID_NAME, done); - if(ALBuf->ref != 0) + if(ReadRef(&ALBuf->ref) != 0) SET_ERROR_AND_GOTO(context, AL_INVALID_OPERATION, done); } @@ -695,7 +695,7 @@ AL_API void AL_APIENTRY alBufferiv(ALuint buffer, ALenum param, const ALint *val { case AL_LOOP_POINTS_SOFT: WriteLock(&albuf->lock); - if(albuf->ref != 0) + if(ReadRef(&albuf->ref) != 0) { WriteUnlock(&albuf->lock); SET_ERROR_AND_GOTO(context, AL_INVALID_OPERATION, done); @@ -980,7 +980,7 @@ static ALenum LoadData(ALbuffer *ALBuf, ALuint freq, ALenum NewFormat, ALsizei f return AL_OUT_OF_MEMORY; WriteLock(&ALBuf->lock); - if(ALBuf->ref != 0) + if(ReadRef(&ALBuf->ref) != 0) { WriteUnlock(&ALBuf->lock); return AL_INVALID_OPERATION; |