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/autowah.cpp | |
parent | 935f386982f9d0d94fdf569b0cb1aa43fbfadefa (diff) |
Implement getDefaultProps for effect state factories
Diffstat (limited to 'Alc/effects/autowah.cpp')
-rw-r--r-- | Alc/effects/autowah.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Alc/effects/autowah.cpp b/Alc/effects/autowah.cpp index 06628e25..03747796 100644 --- a/Alc/effects/autowah.cpp +++ b/Alc/effects/autowah.cpp @@ -33,6 +33,8 @@ #include "filters/biquad.h" #include "vecmat.h" +namespace { + #define MIN_FREQ 20.0f #define MAX_FREQ 2500.0f #define Q_FACTOR 5.0f @@ -199,11 +201,24 @@ void ALautowahState::process(ALsizei samplesToDo, const ALfloat (*RESTRICT sampl struct AutowahStateFactory final : public EffectStateFactory { EffectState *create() override; + ALeffectProps getDefaultProps() const noexcept override; }; EffectState *AutowahStateFactory::create() { return new ALautowahState{}; } +ALeffectProps AutowahStateFactory::getDefaultProps() const noexcept +{ + ALeffectProps props{}; + props.Autowah.AttackTime = AL_AUTOWAH_DEFAULT_ATTACK_TIME; + props.Autowah.ReleaseTime = AL_AUTOWAH_DEFAULT_RELEASE_TIME; + props.Autowah.Resonance = AL_AUTOWAH_DEFAULT_RESONANCE; + props.Autowah.PeakGain = AL_AUTOWAH_DEFAULT_PEAK_GAIN; + return props; +} + +} // namespace + EffectStateFactory *AutowahStateFactory_getFactory() { static AutowahStateFactory AutowahFactory{}; |