aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects/echo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/effects/echo.cpp')
-rw-r--r--Alc/effects/echo.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/Alc/effects/echo.cpp b/Alc/effects/echo.cpp
index 1325e015..e866181d 100644
--- a/Alc/effects/echo.cpp
+++ b/Alc/effects/echo.cpp
@@ -35,6 +35,8 @@
#include "vector.h"
+namespace {
+
struct ALechoState final : public EffectState {
al::vector<ALfloat,16> mSampleBuffer;
@@ -175,11 +177,25 @@ void ALechoState::process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesI
struct EchoStateFactory final : public EffectStateFactory {
EffectState *create() override;
+ ALeffectProps getDefaultProps() const noexcept override;
};
EffectState *EchoStateFactory::create()
{ return new ALechoState{}; }
+ALeffectProps EchoStateFactory::getDefaultProps() const noexcept
+{
+ ALeffectProps props{};
+ props.Echo.Delay = AL_ECHO_DEFAULT_DELAY;
+ props.Echo.LRDelay = AL_ECHO_DEFAULT_LRDELAY;
+ props.Echo.Damping = AL_ECHO_DEFAULT_DAMPING;
+ props.Echo.Feedback = AL_ECHO_DEFAULT_FEEDBACK;
+ props.Echo.Spread = AL_ECHO_DEFAULT_SPREAD;
+ return props;
+}
+
+} // namespace
+
EffectStateFactory *EchoStateFactory_getFactory()
{
static EchoStateFactory EchoFactory{};