aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects/distortion.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/effects/distortion.c')
-rw-r--r--Alc/effects/distortion.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/Alc/effects/distortion.c b/Alc/effects/distortion.c
index 2a7c21ec..dcb2bfe4 100644
--- a/Alc/effects/distortion.c
+++ b/Alc/effects/distortion.c
@@ -198,10 +198,10 @@ ALeffectStateFactory *ALdistortionStateFactory_getFactory(void)
}
-void ALdistortion_setParami(ALeffect *effect, ALCcontext *context, ALenum UNUSED(param), ALint UNUSED(val))
-{ alSetError(context, AL_INVALID_ENUM, effect->id, "Invalid distortion integer property"); }
-void ALdistortion_setParamiv(ALeffect *effect, ALCcontext *context, ALenum UNUSED(param), const ALint *UNUSED(vals))
-{ alSetError(context, AL_INVALID_ENUM, effect->id, "Invalid distortion integer-vector property"); }
+void ALdistortion_setParami(ALeffect *UNUSED(effect), ALCcontext *context, ALenum param, ALint UNUSED(val))
+{ alSetError(context, AL_INVALID_ENUM, "Invalid distortion integer property 0x%04x", param); }
+void ALdistortion_setParamiv(ALeffect *UNUSED(effect), ALCcontext *context, ALenum param, const ALint *UNUSED(vals))
+{ alSetError(context, AL_INVALID_ENUM, "Invalid distortion integer-vector property 0x%04x", param); }
void ALdistortion_setParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat val)
{
ALeffectProps *props = &effect->Props;
@@ -209,45 +209,46 @@ void ALdistortion_setParamf(ALeffect *effect, ALCcontext *context, ALenum param,
{
case AL_DISTORTION_EDGE:
if(!(val >= AL_DISTORTION_MIN_EDGE && val <= AL_DISTORTION_MAX_EDGE))
- SETERR_RETURN(context, AL_INVALID_VALUE, effect->id, "Distortion edge out of range",);
+ SETERR_RETURN(context, AL_INVALID_VALUE,, "Distortion edge out of range");
props->Distortion.Edge = val;
break;
case AL_DISTORTION_GAIN:
if(!(val >= AL_DISTORTION_MIN_GAIN && val <= AL_DISTORTION_MAX_GAIN))
- SETERR_RETURN(context, AL_INVALID_VALUE, effect->id, "Distortion gain out of range",);
+ SETERR_RETURN(context, AL_INVALID_VALUE,, "Distortion gain out of range");
props->Distortion.Gain = val;
break;
case AL_DISTORTION_LOWPASS_CUTOFF:
if(!(val >= AL_DISTORTION_MIN_LOWPASS_CUTOFF && val <= AL_DISTORTION_MAX_LOWPASS_CUTOFF))
- SETERR_RETURN(context, AL_INVALID_VALUE, effect->id, "Distortion low-pass cutoff out of range",);
+ SETERR_RETURN(context, AL_INVALID_VALUE,, "Distortion low-pass cutoff out of range");
props->Distortion.LowpassCutoff = val;
break;
case AL_DISTORTION_EQCENTER:
if(!(val >= AL_DISTORTION_MIN_EQCENTER && val <= AL_DISTORTION_MAX_EQCENTER))
- SETERR_RETURN(context, AL_INVALID_VALUE, effect->id, "Distortion EQ center out of range",);
+ SETERR_RETURN(context, AL_INVALID_VALUE,, "Distortion EQ center out of range");
props->Distortion.EQCenter = val;
break;
case AL_DISTORTION_EQBANDWIDTH:
if(!(val >= AL_DISTORTION_MIN_EQBANDWIDTH && val <= AL_DISTORTION_MAX_EQBANDWIDTH))
- SETERR_RETURN(context, AL_INVALID_VALUE, effect->id, "Distortion EQ bandwidth out of range",);
+ SETERR_RETURN(context, AL_INVALID_VALUE,, "Distortion EQ bandwidth out of range");
props->Distortion.EQBandwidth = val;
break;
default:
- alSetError(context, AL_INVALID_ENUM, effect->id, "Invalid distortion float property");
+ alSetError(context, AL_INVALID_ENUM, "Invalid distortion float property 0x%04x",
+ param);
}
}
void ALdistortion_setParamfv(ALeffect *effect, ALCcontext *context, ALenum param, const ALfloat *vals)
{ ALdistortion_setParamf(effect, context, param, vals[0]); }
-void ALdistortion_getParami(const ALeffect *effect, ALCcontext *context, ALenum UNUSED(param), ALint *UNUSED(val))
-{ alSetError(context, AL_INVALID_ENUM, effect->id, "Invalid distortion integer property"); }
-void ALdistortion_getParamiv(const ALeffect *effect, ALCcontext *context, ALenum UNUSED(param), ALint *UNUSED(vals))
-{ alSetError(context, AL_INVALID_ENUM, effect->id, "Invalid distortion integer-vector property"); }
+void ALdistortion_getParami(const ALeffect *UNUSED(effect), ALCcontext *context, ALenum param, ALint *UNUSED(val))
+{ alSetError(context, AL_INVALID_ENUM, "Invalid distortion integer property 0x%04x", param); }
+void ALdistortion_getParamiv(const ALeffect *UNUSED(effect), ALCcontext *context, ALenum param, ALint *UNUSED(vals))
+{ alSetError(context, AL_INVALID_ENUM, "Invalid distortion integer-vector property 0x%04x", param); }
void ALdistortion_getParamf(const ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *val)
{
const ALeffectProps *props = &effect->Props;
@@ -274,7 +275,8 @@ void ALdistortion_getParamf(const ALeffect *effect, ALCcontext *context, ALenum
break;
default:
- alSetError(context, AL_INVALID_ENUM, effect->id, "Invalid distortion float property");
+ alSetError(context, AL_INVALID_ENUM, "Invalid distortion float property 0x%04x",
+ param);
}
}
void ALdistortion_getParamfv(const ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *vals)