From 8bddf3e6ab77110cb1fe74c02b14847eadc382b4 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 10 Apr 2020 09:16:08 -0700 Subject: Report invalid filter values --- al/filter.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'al/filter.cpp') diff --git a/al/filter.cpp b/al/filter.cpp index a5f60c0e..ecbdc7f6 100644 --- a/al/filter.cpp +++ b/al/filter.cpp @@ -156,13 +156,13 @@ void ALhighpass_setParamf(ALfilter *filter, ALenum param, float val) { case AL_HIGHPASS_GAIN: if(!(val >= FILTER_MIN_GAIN && val <= FILTER_MAX_GAIN)) - throw filter_exception{AL_INVALID_VALUE, "High-pass gain out of range"}; + throw filter_exception{AL_INVALID_VALUE, "High-pass gain %f out of range", val}; filter->Gain = val; break; case AL_HIGHPASS_GAINLF: if(!(val >= AL_HIGHPASS_MIN_GAINLF && val <= AL_HIGHPASS_MAX_GAINLF)) - throw filter_exception{AL_INVALID_VALUE, "High-pass gainlf out of range"}; + throw filter_exception{AL_INVALID_VALUE, "High-pass gainlf %f out of range", val}; filter->GainLF = val; break; @@ -215,19 +215,19 @@ void ALbandpass_setParamf(ALfilter *filter, ALenum param, float val) { case AL_BANDPASS_GAIN: if(!(val >= FILTER_MIN_GAIN && val <= FILTER_MAX_GAIN)) - throw filter_exception{AL_INVALID_VALUE, "Band-pass gain out of range"}; + throw filter_exception{AL_INVALID_VALUE, "Band-pass gain %f out of range", val}; filter->Gain = val; break; case AL_BANDPASS_GAINHF: if(!(val >= AL_BANDPASS_MIN_GAINHF && val <= AL_BANDPASS_MAX_GAINHF)) - throw filter_exception{AL_INVALID_VALUE, "Band-pass gainhf out of range"}; + throw filter_exception{AL_INVALID_VALUE, "Band-pass gainhf %f out of range", val}; filter->GainHF = val; break; case AL_BANDPASS_GAINLF: if(!(val >= AL_BANDPASS_MIN_GAINLF && val <= AL_BANDPASS_MAX_GAINLF)) - throw filter_exception{AL_INVALID_VALUE, "Band-pass gainlf out of range"}; + throw filter_exception{AL_INVALID_VALUE, "Band-pass gainlf %f out of range", val}; filter->GainLF = val; break; -- cgit v1.2.3