diff options
author | Chris Robinson <[email protected]> | 2020-12-04 09:42:13 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-12-04 11:15:50 -0800 |
commit | 69d55d7e03996484cc899de1e21172a7a4532d6b (patch) | |
tree | df23284a2f4d6d01cc2c9cf8c4fb26f62652ad24 /alc/effects/echo.cpp | |
parent | 84d47f7d4c2d1355a6eb914dd091b39683f83c15 (diff) |
Move the filters to core
Diffstat (limited to 'alc/effects/echo.cpp')
-rw-r--r-- | alc/effects/echo.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/alc/effects/echo.cpp b/alc/effects/echo.cpp index a50d3c61..c030ac5b 100644 --- a/alc/effects/echo.cpp +++ b/alc/effects/echo.cpp @@ -25,17 +25,19 @@ #include <algorithm> -#include "al/auxeffectslot.h" -#include "al/filter.h" +#include "AL/efx.h" + #include "alcmain.h" #include "alcontext.h" -#include "alu.h" -#include "filters/biquad.h" +#include "core/filters/biquad.h" +#include "effectslot.h" #include "vector.h" namespace { +constexpr float LowpassFreqRef{5000.0f}; + struct EchoState final : public EffectState { al::vector<float,16> mSampleBuffer; @@ -95,7 +97,7 @@ void EchoState::update(const ALCcontext *context, const EffectSlot *slot, mTap[1].delay = float2uint(props->Echo.LRDelay*frequency + 0.5f) + mTap[0].delay; const float gainhf{maxf(1.0f - props->Echo.Damping, 0.0625f)}; /* Limit -24dB */ - mFilter.setParamsFromSlope(BiquadType::HighShelf, LOWPASSFREQREF/frequency, gainhf, 1.0f); + mFilter.setParamsFromSlope(BiquadType::HighShelf, LowpassFreqRef/frequency, gainhf, 1.0f); mFeedGain = props->Echo.Feedback; |