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/equalizer.cpp | |
parent | 935f386982f9d0d94fdf569b0cb1aa43fbfadefa (diff) |
Implement getDefaultProps for effect state factories
Diffstat (limited to 'Alc/effects/equalizer.cpp')
-rw-r--r-- | Alc/effects/equalizer.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/Alc/effects/equalizer.cpp b/Alc/effects/equalizer.cpp index c4d2e53f..27a5539c 100644 --- a/Alc/effects/equalizer.cpp +++ b/Alc/effects/equalizer.cpp @@ -173,15 +173,33 @@ void ALequalizerState::process(ALsizei samplesToDo, const ALfloat (*RESTRICT sam } } -} // namespace struct EqualizerStateFactory final : public EffectStateFactory { EffectState *create() override; + ALeffectProps getDefaultProps() const noexcept override; }; EffectState *EqualizerStateFactory::create() { return new ALequalizerState{}; } +ALeffectProps EqualizerStateFactory::getDefaultProps() const noexcept +{ + ALeffectProps props{}; + props.Equalizer.LowCutoff = AL_EQUALIZER_DEFAULT_LOW_CUTOFF; + props.Equalizer.LowGain = AL_EQUALIZER_DEFAULT_LOW_GAIN; + props.Equalizer.Mid1Center = AL_EQUALIZER_DEFAULT_MID1_CENTER; + props.Equalizer.Mid1Gain = AL_EQUALIZER_DEFAULT_MID1_GAIN; + props.Equalizer.Mid1Width = AL_EQUALIZER_DEFAULT_MID1_WIDTH; + props.Equalizer.Mid2Center = AL_EQUALIZER_DEFAULT_MID2_CENTER; + props.Equalizer.Mid2Gain = AL_EQUALIZER_DEFAULT_MID2_GAIN; + props.Equalizer.Mid2Width = AL_EQUALIZER_DEFAULT_MID2_WIDTH; + props.Equalizer.HighCutoff = AL_EQUALIZER_DEFAULT_HIGH_CUTOFF; + props.Equalizer.HighGain = AL_EQUALIZER_DEFAULT_HIGH_GAIN; + return props; +} + +} // namespace + EffectStateFactory *EqualizerStateFactory_getFactory() { static EqualizerStateFactory EqualizerFactory{}; |