aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alPreset.c
diff options
context:
space:
mode:
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;