aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alFilter.c
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32/alFilter.c')
-rw-r--r--OpenAL32/alFilter.c136
1 files changed, 68 insertions, 68 deletions
diff --git a/OpenAL32/alFilter.c b/OpenAL32/alFilter.c
index 24b0e607..34f2f271 100644
--- a/OpenAL32/alFilter.c
+++ b/OpenAL32/alFilter.c
@@ -55,7 +55,7 @@ AL_API ALvoid AL_APIENTRY alGenFilters(ALsizei n, ALuint *filters)
if(!context) return;
if(!(n >= 0))
- SETERR_GOTO(context, AL_INVALID_VALUE, 0, "Generating negative filters", done);
+ SETERR_GOTO(context, AL_INVALID_VALUE, done, "Generating %d filters", n);
device = context->Device;
for(cur = 0;cur < n;cur++)
@@ -64,7 +64,7 @@ AL_API ALvoid AL_APIENTRY alGenFilters(ALsizei n, ALuint *filters)
if(!filter)
{
alDeleteFilters(cur, filters);
- SETERR_GOTO(context, AL_OUT_OF_MEMORY, 0, "Failed to allocate filter object", done);
+ SETERR_GOTO(context, AL_OUT_OF_MEMORY, done, "Failed to allocate filter object");
}
InitFilterParams(filter, AL_FILTER_NULL);
@@ -78,7 +78,7 @@ AL_API ALvoid AL_APIENTRY alGenFilters(ALsizei n, ALuint *filters)
al_free(filter);
alDeleteFilters(cur, filters);
- SETERR_GOTO(context, err, 0, "Failed ot set filter ID", done);
+ SETERR_GOTO(context, err, done, "Failed ot set filter ID");
}
filters[cur] = filter->id;
@@ -101,11 +101,11 @@ AL_API ALvoid AL_APIENTRY alDeleteFilters(ALsizei n, const ALuint *filters)
device = context->Device;
LockFiltersWrite(device);
if(!(n >= 0))
- SETERR_GOTO(context, AL_INVALID_VALUE, 0, "Deleting negative filters", done);
+ SETERR_GOTO(context, AL_INVALID_VALUE, done, "Deleting %d filters", n);
for(i = 0;i < n;i++)
{
if(filters[i] && LookupFilter(device, filters[i]) == NULL)
- SETERR_GOTO(context, AL_INVALID_NAME, filters[i], "Invalid filter ID", done);
+ SETERR_GOTO(context, AL_INVALID_NAME, done, "Invalid filter ID %u", filters[i]);
}
for(i = 0;i < n;i++)
{
@@ -152,7 +152,7 @@ AL_API ALvoid AL_APIENTRY alFilteri(ALuint filter, ALenum param, ALint value)
Device = Context->Device;
LockFiltersWrite(Device);
if((ALFilter=LookupFilter(Device, filter)) == NULL)
- alSetError(Context, AL_INVALID_NAME, filter, "Invalid filter ID");
+ alSetError(Context, AL_INVALID_NAME, "Invalid filter ID %u", filter);
else
{
if(param == AL_FILTER_TYPE)
@@ -161,7 +161,7 @@ AL_API ALvoid AL_APIENTRY alFilteri(ALuint filter, ALenum param, ALint value)
value == AL_FILTER_HIGHPASS || value == AL_FILTER_BANDPASS)
InitFilterParams(ALFilter, value);
else
- alSetError(Context, AL_INVALID_VALUE, filter, "Filter type not supported");
+ alSetError(Context, AL_INVALID_VALUE, "Invalid filter type 0x%04x", value);
}
else
{
@@ -193,7 +193,7 @@ AL_API ALvoid AL_APIENTRY alFilteriv(ALuint filter, ALenum param, const ALint *v
Device = Context->Device;
LockFiltersWrite(Device);
if((ALFilter=LookupFilter(Device, filter)) == NULL)
- alSetError(Context, AL_INVALID_NAME, filter, "Invalid filter ID");
+ alSetError(Context, AL_INVALID_NAME, "Invalid filter ID %u", filter);
else
{
/* Call the appropriate handler */
@@ -216,7 +216,7 @@ AL_API ALvoid AL_APIENTRY alFilterf(ALuint filter, ALenum param, ALfloat value)
Device = Context->Device;
LockFiltersWrite(Device);
if((ALFilter=LookupFilter(Device, filter)) == NULL)
- alSetError(Context, AL_INVALID_NAME, filter, "Invalid filter ID");
+ alSetError(Context, AL_INVALID_NAME, "Invalid filter ID %u", filter);
else
{
/* Call the appropriate handler */
@@ -239,7 +239,7 @@ AL_API ALvoid AL_APIENTRY alFilterfv(ALuint filter, ALenum param, const ALfloat
Device = Context->Device;
LockFiltersWrite(Device);
if((ALFilter=LookupFilter(Device, filter)) == NULL)
- alSetError(Context, AL_INVALID_NAME, filter, "Invalid filter ID");
+ alSetError(Context, AL_INVALID_NAME, "Invalid filter ID %u", filter);
else
{
/* Call the appropriate handler */
@@ -262,7 +262,7 @@ AL_API ALvoid AL_APIENTRY alGetFilteri(ALuint filter, ALenum param, ALint *value
Device = Context->Device;
LockFiltersRead(Device);
if((ALFilter=LookupFilter(Device, filter)) == NULL)
- alSetError(Context, AL_INVALID_NAME, filter, "Invalid filter ID");
+ alSetError(Context, AL_INVALID_NAME, "Invalid filter ID %u", filter);
else
{
if(param == AL_FILTER_TYPE)
@@ -297,7 +297,7 @@ AL_API ALvoid AL_APIENTRY alGetFilteriv(ALuint filter, ALenum param, ALint *valu
Device = Context->Device;
LockFiltersRead(Device);
if((ALFilter=LookupFilter(Device, filter)) == NULL)
- alSetError(Context, AL_INVALID_NAME, filter, "Invalid filter ID");
+ alSetError(Context, AL_INVALID_NAME, "Invalid filter ID %u", filter);
else
{
/* Call the appropriate handler */
@@ -320,7 +320,7 @@ AL_API ALvoid AL_APIENTRY alGetFilterf(ALuint filter, ALenum param, ALfloat *val
Device = Context->Device;
LockFiltersRead(Device);
if((ALFilter=LookupFilter(Device, filter)) == NULL)
- alSetError(Context, AL_INVALID_NAME, filter, "Invalid filter ID");
+ alSetError(Context, AL_INVALID_NAME, "Invalid filter ID %u", filter);
else
{
/* Call the appropriate handler */
@@ -343,7 +343,7 @@ AL_API ALvoid AL_APIENTRY alGetFilterfv(ALuint filter, ALenum param, ALfloat *va
Device = Context->Device;
LockFiltersRead(Device);
if((ALFilter=LookupFilter(Device, filter)) == NULL)
- alSetError(Context, AL_INVALID_NAME, filter, "Invalid filter ID");
+ alSetError(Context, AL_INVALID_NAME, "Invalid filter ID %u", filter);
else
{
/* Call the appropriate handler */
@@ -435,37 +435,37 @@ void ALfilterState_setParams(ALfilterState *filter, ALfilterType type, ALfloat g
}
-static void ALlowpass_setParami(ALfilter *filter, ALCcontext *context, ALenum UNUSED(param), ALint UNUSED(val))
-{ alSetError(context, AL_INVALID_ENUM, filter->id, "Invalid low-pass integer property"); }
-static void ALlowpass_setParamiv(ALfilter *filter, ALCcontext *context, ALenum UNUSED(param), const ALint *UNUSED(vals))
-{ alSetError(context, AL_INVALID_ENUM, filter->id, "Invalid low-pass integer-vector property"); }
+static void ALlowpass_setParami(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint UNUSED(val))
+{ alSetError(context, AL_INVALID_ENUM, "Invalid low-pass integer property 0x%04x", param); }
+static void ALlowpass_setParamiv(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, const ALint *UNUSED(vals))
+{ alSetError(context, AL_INVALID_ENUM, "Invalid low-pass integer-vector property 0x%04x", param); }
static void ALlowpass_setParamf(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat val)
{
switch(param)
{
case AL_LOWPASS_GAIN:
if(!(val >= AL_LOWPASS_MIN_GAIN && val <= AL_LOWPASS_MAX_GAIN))
- SETERR_RETURN(context, AL_INVALID_VALUE, filter->id, "Low-pass gain out of range",);
+ SETERR_RETURN(context, AL_INVALID_VALUE,, "Low-pass gain %f out of range", val);
filter->Gain = val;
break;
case AL_LOWPASS_GAINHF:
if(!(val >= AL_LOWPASS_MIN_GAINHF && val <= AL_LOWPASS_MAX_GAINHF))
- SETERR_RETURN(context, AL_INVALID_VALUE, filter->id, "Low-pass gainhf out of range",);
+ SETERR_RETURN(context, AL_INVALID_VALUE,, "Low-pass gainhf %f out of range", val);
filter->GainHF = val;
break;
default:
- alSetError(context, AL_INVALID_ENUM, filter->id, "Invalid low-pass float property");
+ alSetError(context, AL_INVALID_ENUM, "Invalid low-pass float property 0x%04x", param);
}
}
static void ALlowpass_setParamfv(ALfilter *filter, ALCcontext *context, ALenum param, const ALfloat *vals)
{ ALlowpass_setParamf(filter, context, param, vals[0]); }
-static void ALlowpass_getParami(ALfilter *filter, ALCcontext *context, ALenum UNUSED(param), ALint *UNUSED(val))
-{ alSetError(context, AL_INVALID_ENUM, filter->id, "Invalid low-pass integer property"); }
-static void ALlowpass_getParamiv(ALfilter *filter, ALCcontext *context, ALenum UNUSED(param), ALint *UNUSED(vals))
-{ alSetError(context, AL_INVALID_ENUM, filter->id, "Invalid low-pass integer-vector property"); }
+static void ALlowpass_getParami(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint *UNUSED(val))
+{ alSetError(context, AL_INVALID_ENUM, "Invalid low-pass integer property 0x%04x", param); }
+static void ALlowpass_getParamiv(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint *UNUSED(vals))
+{ alSetError(context, AL_INVALID_ENUM, "Invalid low-pass integer-vector property 0x%04x", param); }
static void ALlowpass_getParamf(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat *val)
{
switch(param)
@@ -479,7 +479,7 @@ static void ALlowpass_getParamf(ALfilter *filter, ALCcontext *context, ALenum pa
break;
default:
- alSetError(context, AL_INVALID_ENUM, filter->id, "Invalid low-pass float property");
+ alSetError(context, AL_INVALID_ENUM, "Invalid low-pass float property 0x%04x", param);
}
}
static void ALlowpass_getParamfv(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat *vals)
@@ -488,37 +488,37 @@ static void ALlowpass_getParamfv(ALfilter *filter, ALCcontext *context, ALenum p
DEFINE_ALFILTER_VTABLE(ALlowpass);
-static void ALhighpass_setParami(ALfilter *filter, ALCcontext *context, ALenum UNUSED(param), ALint UNUSED(val))
-{ alSetError(context, AL_INVALID_ENUM, filter->id, "Invalid high-pass integer property"); }
-static void ALhighpass_setParamiv(ALfilter *filter, ALCcontext *context, ALenum UNUSED(param), const ALint *UNUSED(vals))
-{ alSetError(context, AL_INVALID_ENUM, filter->id, "Invalid high-pass integer-vector property"); }
+static void ALhighpass_setParami(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint UNUSED(val))
+{ alSetError(context, AL_INVALID_ENUM, "Invalid high-pass integer property 0x%04x", param); }
+static void ALhighpass_setParamiv(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, const ALint *UNUSED(vals))
+{ alSetError(context, AL_INVALID_ENUM, "Invalid high-pass integer-vector property 0x%04x", param); }
static void ALhighpass_setParamf(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat val)
{
switch(param)
{
case AL_HIGHPASS_GAIN:
if(!(val >= AL_HIGHPASS_MIN_GAIN && val <= AL_HIGHPASS_MAX_GAIN))
- SETERR_RETURN(context, AL_INVALID_VALUE, filter->id, "High-pass gain out of range",);
+ SETERR_RETURN(context, AL_INVALID_VALUE,, "High-pass gain out of range");
filter->Gain = val;
break;
case AL_HIGHPASS_GAINLF:
if(!(val >= AL_HIGHPASS_MIN_GAINLF && val <= AL_HIGHPASS_MAX_GAINLF))
- SETERR_RETURN(context, AL_INVALID_VALUE, filter->id, "High-pass gainlf out of range",);
+ SETERR_RETURN(context, AL_INVALID_VALUE,, "High-pass gainlf out of range");
filter->GainLF = val;
break;
default:
- alSetError(context, AL_INVALID_ENUM, filter->id, "Invalid high-pass float property");
+ alSetError(context, AL_INVALID_ENUM, "Invalid high-pass float property 0x%04x", param);
}
}
static void ALhighpass_setParamfv(ALfilter *filter, ALCcontext *context, ALenum param, const ALfloat *vals)
{ ALhighpass_setParamf(filter, context, param, vals[0]); }
-static void ALhighpass_getParami(ALfilter *filter, ALCcontext *context, ALenum UNUSED(param), ALint *UNUSED(val))
-{ alSetError(context, AL_INVALID_ENUM, filter->id, "Invalid high-pass integer property"); }
-static void ALhighpass_getParamiv(ALfilter *filter, ALCcontext *context, ALenum UNUSED(param), ALint *UNUSED(vals))
-{ alSetError(context, AL_INVALID_ENUM, filter->id, "Invalid high-pass integer-vector property"); }
+static void ALhighpass_getParami(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint *UNUSED(val))
+{ alSetError(context, AL_INVALID_ENUM, "Invalid high-pass integer property 0x%04x", param); }
+static void ALhighpass_getParamiv(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint *UNUSED(vals))
+{ alSetError(context, AL_INVALID_ENUM, "Invalid high-pass integer-vector property 0x%04x", param); }
static void ALhighpass_getParamf(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat *val)
{
switch(param)
@@ -532,7 +532,7 @@ static void ALhighpass_getParamf(ALfilter *filter, ALCcontext *context, ALenum p
break;
default:
- alSetError(context, AL_INVALID_ENUM, filter->id, "Invalid high-pass float property");
+ alSetError(context, AL_INVALID_ENUM, "Invalid high-pass float property 0x%04x", param);
}
}
static void ALhighpass_getParamfv(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat *vals)
@@ -541,43 +541,43 @@ static void ALhighpass_getParamfv(ALfilter *filter, ALCcontext *context, ALenum
DEFINE_ALFILTER_VTABLE(ALhighpass);
-static void ALbandpass_setParami(ALfilter *filter, ALCcontext *context, ALenum UNUSED(param), ALint UNUSED(val))
-{ alSetError(context, AL_INVALID_ENUM, filter->id, "Invalid band-pass integer property"); }
-static void ALbandpass_setParamiv(ALfilter *filter, ALCcontext *context, ALenum UNUSED(param), const ALint *UNUSED(vals))
-{ alSetError(context, AL_INVALID_ENUM, filter->id, "Invalid band-pass integer-vector property"); }
+static void ALbandpass_setParami(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint UNUSED(val))
+{ alSetError(context, AL_INVALID_ENUM, "Invalid band-pass integer property 0x%04x", param); }
+static void ALbandpass_setParamiv(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, const ALint *UNUSED(vals))
+{ alSetError(context, AL_INVALID_ENUM, "Invalid band-pass integer-vector property 0x%04x", param); }
static void ALbandpass_setParamf(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat val)
{
switch(param)
{
case AL_BANDPASS_GAIN:
if(!(val >= AL_BANDPASS_MIN_GAIN && val <= AL_BANDPASS_MAX_GAIN))
- SETERR_RETURN(context, AL_INVALID_VALUE, filter->id, "Band-pass gain out of range",);
+ SETERR_RETURN(context, AL_INVALID_VALUE,, "Band-pass gain out of range");
filter->Gain = val;
break;
case AL_BANDPASS_GAINHF:
if(!(val >= AL_BANDPASS_MIN_GAINHF && val <= AL_BANDPASS_MAX_GAINHF))
- SETERR_RETURN(context, AL_INVALID_VALUE, filter->id, "Band-pass gainhf out of range",);
+ SETERR_RETURN(context, AL_INVALID_VALUE,, "Band-pass gainhf out of range");
filter->GainHF = val;
break;
case AL_BANDPASS_GAINLF:
if(!(val >= AL_BANDPASS_MIN_GAINLF && val <= AL_BANDPASS_MAX_GAINLF))
- SETERR_RETURN(context, AL_INVALID_VALUE, filter->id, "Band-pass gainlf out of range",);
+ SETERR_RETURN(context, AL_INVALID_VALUE,, "Band-pass gainlf out of range");
filter->GainLF = val;
break;
default:
- alSetError(context, AL_INVALID_ENUM, filter->id, "Invalid band-pass float property");
+ alSetError(context, AL_INVALID_ENUM, "Invalid band-pass float property 0x%04x", param);
}
}
static void ALbandpass_setParamfv(ALfilter *filter, ALCcontext *context, ALenum param, const ALfloat *vals)
{ ALbandpass_setParamf(filter, context, param, vals[0]); }
-static void ALbandpass_getParami(ALfilter *filter, ALCcontext *context, ALenum UNUSED(param), ALint *UNUSED(val))
-{ alSetError(context, AL_INVALID_ENUM, filter->id, "Invalid band-pass integer property"); }
-static void ALbandpass_getParamiv(ALfilter *filter, ALCcontext *context, ALenum UNUSED(param), ALint *UNUSED(vals))
-{ alSetError(context, AL_INVALID_ENUM, filter->id, "Invalid band-pass integer-vector property"); }
+static void ALbandpass_getParami(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint *UNUSED(val))
+{ alSetError(context, AL_INVALID_ENUM, "Invalid band-pass integer property 0x%04x", param); }
+static void ALbandpass_getParamiv(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint *UNUSED(vals))
+{ alSetError(context, AL_INVALID_ENUM, "Invalid band-pass integer-vector property 0x%04x", param); }
static void ALbandpass_getParamf(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat *val)
{
switch(param)
@@ -595,7 +595,7 @@ static void ALbandpass_getParamf(ALfilter *filter, ALCcontext *context, ALenum p
break;
default:
- alSetError(context, AL_INVALID_ENUM, filter->id, "Invalid band-pass float property");
+ alSetError(context, AL_INVALID_ENUM, "Invalid band-pass float property 0x%04x", param);
}
}
static void ALbandpass_getParamfv(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat *vals)
@@ -604,23 +604,23 @@ static void ALbandpass_getParamfv(ALfilter *filter, ALCcontext *context, ALenum
DEFINE_ALFILTER_VTABLE(ALbandpass);
-static void ALnullfilter_setParami(ALfilter *filter, ALCcontext *context, ALenum UNUSED(param), ALint UNUSED(val))
-{ alSetError(context, AL_INVALID_ENUM, filter->id, "Invalid null filter property"); }
-static void ALnullfilter_setParamiv(ALfilter *filter, ALCcontext *context, ALenum UNUSED(param), const ALint *UNUSED(vals))
-{ alSetError(context, AL_INVALID_ENUM, filter->id, "Invalid null filter property"); }
-static void ALnullfilter_setParamf(ALfilter *filter, ALCcontext *context, ALenum UNUSED(param), ALfloat UNUSED(val))
-{ alSetError(context, AL_INVALID_ENUM, filter->id, "Invalid null filter property"); }
-static void ALnullfilter_setParamfv(ALfilter *filter, ALCcontext *context, ALenum UNUSED(param), const ALfloat *UNUSED(vals))
-{ alSetError(context, AL_INVALID_ENUM, filter->id, "Invalid null filter property"); }
-
-static void ALnullfilter_getParami(ALfilter *filter, ALCcontext *context, ALenum UNUSED(param), ALint *UNUSED(val))
-{ alSetError(context, AL_INVALID_ENUM, filter->id, "Invalid null filter property"); }
-static void ALnullfilter_getParamiv(ALfilter *filter, ALCcontext *context, ALenum UNUSED(param), ALint *UNUSED(vals))
-{ alSetError(context, AL_INVALID_ENUM, filter->id, "Invalid null filter property"); }
-static void ALnullfilter_getParamf(ALfilter *filter, ALCcontext *context, ALenum UNUSED(param), ALfloat *UNUSED(val))
-{ alSetError(context, AL_INVALID_ENUM, filter->id, "Invalid null filter property"); }
-static void ALnullfilter_getParamfv(ALfilter *filter, ALCcontext *context, ALenum UNUSED(param), ALfloat *UNUSED(vals))
-{ alSetError(context, AL_INVALID_ENUM, filter->id, "Invalid null filter property"); }
+static void ALnullfilter_setParami(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint UNUSED(val))
+{ alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); }
+static void ALnullfilter_setParamiv(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, const ALint *UNUSED(vals))
+{ alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); }
+static void ALnullfilter_setParamf(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALfloat UNUSED(val))
+{ alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); }
+static void ALnullfilter_setParamfv(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, const ALfloat *UNUSED(vals))
+{ alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); }
+
+static void ALnullfilter_getParami(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint *UNUSED(val))
+{ alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); }
+static void ALnullfilter_getParamiv(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint *UNUSED(vals))
+{ alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); }
+static void ALnullfilter_getParamf(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALfloat *UNUSED(val))
+{ alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); }
+static void ALnullfilter_getParamfv(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALfloat *UNUSED(vals))
+{ alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); }
DEFINE_ALFILTER_VTABLE(ALnullfilter);