From cc67f4589256efceb17c58673159b3e687ec0436 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 29 Aug 2011 23:05:47 -0700 Subject: Use the reference counting functions for the buffer and auxiliary slot refs --- OpenAL32/alBuffer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenAL32/alBuffer.c') diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c index 7d5b895f..ebcd4724 100644 --- a/OpenAL32/alBuffer.c +++ b/OpenAL32/alBuffer.c @@ -221,7 +221,7 @@ AL_API ALvoid AL_APIENTRY alDeleteBuffers(ALsizei n, const ALuint *buffers) Failed = AL_TRUE; break; } - else if(ALBuf->refcount != 0) + else if(ALBuf->ref != 0) { /* Buffer still in use, cannot be deleted */ alSetError(Context, AL_INVALID_OPERATION); @@ -297,7 +297,7 @@ AL_API ALvoid AL_APIENTRY alBufferData(ALuint buffer,ALenum format,const ALvoid device = Context->Device; if((ALBuf=LookupBuffer(device->BufferMap, buffer)) == NULL) alSetError(Context, AL_INVALID_NAME); - else if(ALBuf->refcount != 0) + else if(ALBuf->ref != 0) alSetError(Context, AL_INVALID_VALUE); else if(size < 0 || freq < 0) alSetError(Context, AL_INVALID_VALUE); @@ -453,7 +453,7 @@ AL_API void AL_APIENTRY alBufferSamplesSOFT(ALuint buffer, device = Context->Device; if((ALBuf=LookupBuffer(device->BufferMap, buffer)) == NULL) alSetError(Context, AL_INVALID_NAME); - else if(ALBuf->refcount != 0) + else if(ALBuf->ref != 0) alSetError(Context, AL_INVALID_VALUE); else if(frames < 0 || samplerate == 0) alSetError(Context, AL_INVALID_VALUE); @@ -737,7 +737,7 @@ AL_API void AL_APIENTRY alBufferiv(ALuint buffer, ALenum eParam, const ALint* pl switch(eParam) { case AL_LOOP_POINTS_SOFT: - if(ALBuf->refcount > 0) + if(ALBuf->ref != 0) alSetError(pContext, AL_INVALID_OPERATION); else if(plValues[0] < 0 || plValues[1] < 0 || plValues[0] >= plValues[1] || ALBuf->size == 0) -- cgit v1.2.3