aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alFontsound.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-05-14 02:47:07 -0700
committerChris Robinson <[email protected]>2014-05-14 02:47:07 -0700
commit1d2504d12e996a4c1e8fe9785901db9a9e3b4d7c (patch)
tree51895ba97192cee1fccab44a838e4fa43d81a984 /OpenAL32/alFontsound.c
parent4454ae25c753388c529b937ae2ce0f47f06d16c4 (diff)
Make RefCount a non-integer type
It should only be accessed through the appropriate functions to ensure proper atomicity.
Diffstat (limited to 'OpenAL32/alFontsound.c')
-rw-r--r--OpenAL32/alFontsound.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenAL32/alFontsound.c b/OpenAL32/alFontsound.c
index 94cf3064..c4d49e92 100644
--- a/OpenAL32/alFontsound.c
+++ b/OpenAL32/alFontsound.c
@@ -69,7 +69,7 @@ AL_API ALvoid AL_APIENTRY alDeleteFontsoundsSOFT(ALsizei n, const ALuint *ids)
/* Check for valid ID */
if((inst=LookupFontsound(device, ids[i])) == NULL)
SET_ERROR_AND_GOTO(context, AL_INVALID_NAME, done);
- if(inst->ref != 0)
+ if(ReadRef(&inst->ref) != 0)
SET_ERROR_AND_GOTO(context, AL_INVALID_OPERATION, done);
}
@@ -115,7 +115,7 @@ AL_API void AL_APIENTRY alFontsoundiSOFT(ALuint id, ALenum param, ALint value)
device = context->Device;
if(!(sound=LookupFontsound(device, id)))
SET_ERROR_AND_GOTO(context, AL_INVALID_NAME, done);
- if(sound->ref != 0)
+ if(ReadRef(&sound->ref) != 0)
SET_ERROR_AND_GOTO(context, AL_INVALID_OPERATION, done);
ALfontsound_setPropi(sound, context, param, value);
@@ -136,7 +136,7 @@ AL_API void AL_APIENTRY alFontsound2iSOFT(ALuint id, ALenum param, ALint value1,
device = context->Device;
if(!(sound=LookupFontsound(device, id)))
SET_ERROR_AND_GOTO(context, AL_INVALID_NAME, done);
- if(sound->ref != 0)
+ if(ReadRef(&sound->ref) != 0)
SET_ERROR_AND_GOTO(context, AL_INVALID_OPERATION, done);
switch(param)
{
@@ -231,7 +231,7 @@ AL_API void AL_APIENTRY alFontsoundivSOFT(ALuint id, ALenum param, const ALint *
device = context->Device;
if(!(sound=LookupFontsound(device, id)))
SET_ERROR_AND_GOTO(context, AL_INVALID_NAME, done);
- if(sound->ref != 0)
+ if(ReadRef(&sound->ref) != 0)
SET_ERROR_AND_GOTO(context, AL_INVALID_OPERATION, done);
switch(param)
{
@@ -508,7 +508,7 @@ ALfontsound *NewFontsound(ALCcontext *context)
static void ALfontsound_Construct(ALfontsound *self)
{
- self->ref = 0;
+ InitRef(&self->ref, 0);
self->MinKey = 0;
self->MaxKey = 127;
@@ -829,7 +829,7 @@ void ALfontsound_setModStagei(ALfontsound *self, ALCcontext *context, ALsizei st
{
ALint srcidx = 0;
- if(self->ref != 0)
+ if(ReadRef(&self->ref) != 0)
SET_ERROR_AND_RETURN(context, AL_INVALID_OPERATION);
switch(param)
{