diff options
author | Chris Robinson <[email protected]> | 2019-03-22 12:58:24 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-03-22 12:58:24 -0700 |
commit | f951f4a66b3e9cc8db7ab190b8443fa6c834fee7 (patch) | |
tree | ae4f1a19e93810d42f5b2b98446fe83b8cc2b1b2 /Alc/effects/echo.cpp | |
parent | 935f386982f9d0d94fdf569b0cb1aa43fbfadefa (diff) |
Implement getDefaultProps for effect state factories
Diffstat (limited to 'Alc/effects/echo.cpp')
-rw-r--r-- | Alc/effects/echo.cpp | 16 |
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{}; |