From d86f1ab4768ce9fdb3480a9d2a81d8f8e9293e0e Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 28 Feb 2022 12:57:18 -0800 Subject: [PATCH] Remove AL_SOFTX_filter_gain_ex It was only added to try to help DSOAL, and it's not clear if it's even necessary. But with native EAX API support, it certainly isn't necessary anymore. --- al/filter.cpp | 8 +++----- alc/context.cpp | 1 - 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/al/filter.cpp b/al/filter.cpp index 73067fd9..f4b0ac9d 100644 --- a/al/filter.cpp +++ b/al/filter.cpp @@ -67,8 +67,6 @@ public: ALenum errorCode() const noexcept { return mErrorCode; } }; -#define FILTER_MIN_GAIN 0.0f -#define FILTER_MAX_GAIN 4.0f /* +12dB */ #define DEFINE_ALFILTER_VTABLE(T) \ const ALfilter::Vtable T##_vtable = { \ @@ -88,7 +86,7 @@ void ALlowpass_setParamf(ALfilter *filter, ALenum param, float val) switch(param) { case AL_LOWPASS_GAIN: - if(!(val >= FILTER_MIN_GAIN && val <= FILTER_MAX_GAIN)) + if(!(val >= AL_LOWPASS_MIN_GAIN && val <= AL_LOWPASS_MAX_GAIN)) throw filter_exception{AL_INVALID_VALUE, "Low-pass gain %f out of range", val}; filter->Gain = val; break; @@ -147,7 +145,7 @@ void ALhighpass_setParamf(ALfilter *filter, ALenum param, float val) switch(param) { case AL_HIGHPASS_GAIN: - if(!(val >= FILTER_MIN_GAIN && val <= FILTER_MAX_GAIN)) + if(!(val >= AL_HIGHPASS_MIN_GAIN && val <= AL_HIGHPASS_MAX_GAIN)) throw filter_exception{AL_INVALID_VALUE, "High-pass gain %f out of range", val}; filter->Gain = val; break; @@ -206,7 +204,7 @@ void ALbandpass_setParamf(ALfilter *filter, ALenum param, float val) switch(param) { case AL_BANDPASS_GAIN: - if(!(val >= FILTER_MIN_GAIN && val <= FILTER_MAX_GAIN)) + if(!(val >= AL_BANDPASS_MIN_GAIN && val <= AL_BANDPASS_MAX_GAIN)) throw filter_exception{AL_INVALID_VALUE, "Band-pass gain %f out of range", val}; filter->Gain = val; break; diff --git a/alc/context.cpp b/alc/context.cpp index ec4e9182..428165e2 100644 --- a/alc/context.cpp +++ b/alc/context.cpp @@ -72,7 +72,6 @@ constexpr ALchar alExtList[] = "AL_SOFT_direct_channels_remix " "AL_SOFT_effect_target " "AL_SOFT_events " - "AL_SOFTX_filter_gain_ex " "AL_SOFT_gain_clamp_ex " "AL_SOFTX_hold_on_disconnect " "AL_SOFT_loop_points " -- 2.11.4.GIT