aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects/autowah.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/effects/autowah.cpp')
-rw-r--r--Alc/effects/autowah.cpp15
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{};