aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alPreset.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/alPreset.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/alPreset.c')
-rw-r--r--OpenAL32/alPreset.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenAL32/alPreset.c b/OpenAL32/alPreset.c
index d34772a4..c7167d6b 100644
--- a/OpenAL32/alPreset.c
+++ b/OpenAL32/alPreset.c
@@ -65,7 +65,7 @@ AL_API ALvoid AL_APIENTRY alDeletePresetsSOFT(ALsizei n, const ALuint *ids)
/* Check for valid ID */
if((preset=LookupPreset(device, ids[i])) == NULL)
SET_ERROR_AND_GOTO(context, AL_INVALID_NAME, done);
- if(preset->ref != 0)
+ if(ReadRef(&preset->ref) != 0)
SET_ERROR_AND_GOTO(context, AL_INVALID_OPERATION, done);
}
@@ -107,7 +107,7 @@ AL_API void AL_APIENTRY alPresetiSOFT(ALuint id, ALenum param, ALint value)
device = context->Device;
if((preset=LookupPreset(device, id)) == NULL)
SET_ERROR_AND_GOTO(context, AL_INVALID_NAME, done);
- if(preset->ref != 0)
+ if(ReadRef(&preset->ref) != 0)
SET_ERROR_AND_GOTO(context, AL_INVALID_OPERATION, done);
switch(param)
{
@@ -151,7 +151,7 @@ AL_API void AL_APIENTRY alPresetivSOFT(ALuint id, ALenum param, const ALint *val
device = context->Device;
if((preset=LookupPreset(device, id)) == NULL)
SET_ERROR_AND_GOTO(context, AL_INVALID_NAME, done);
- if(preset->ref != 0)
+ if(ReadRef(&preset->ref) != 0)
SET_ERROR_AND_GOTO(context, AL_INVALID_OPERATION, done);
switch(param)
{
@@ -220,7 +220,7 @@ AL_API void AL_APIENTRY alPresetFontsoundsSOFT(ALuint id, ALsizei count, const A
if(count < 0)
SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done);
- if(preset->ref != 0)
+ if(ReadRef(&preset->ref) != 0)
SET_ERROR_AND_GOTO(context, AL_INVALID_OPERATION, done);
if(count == 0)
@@ -294,7 +294,7 @@ void DeletePreset(ALsfpreset *preset, ALCdevice *device)
static void ALsfpreset_Construct(ALsfpreset *self)
{
- self->ref = 0;
+ InitRef(&self->ref, 0);
self->Preset = 0;
self->Bank = 0;