aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects/fshifter.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-03-22 12:58:24 -0700
committerChris Robinson <[email protected]>2019-03-22 12:58:24 -0700
commitf951f4a66b3e9cc8db7ab190b8443fa6c834fee7 (patch)
treeae4f1a19e93810d42f5b2b98446fe83b8cc2b1b2 /Alc/effects/fshifter.cpp
parent935f386982f9d0d94fdf569b0cb1aa43fbfadefa (diff)
Implement getDefaultProps for effect state factories
Diffstat (limited to 'Alc/effects/fshifter.cpp')
-rw-r--r--Alc/effects/fshifter.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/Alc/effects/fshifter.cpp b/Alc/effects/fshifter.cpp
index 21d3a706..ea24b477 100644
--- a/Alc/effects/fshifter.cpp
+++ b/Alc/effects/fshifter.cpp
@@ -202,15 +202,26 @@ void ALfshifterState::process(ALsizei samplesToDo, const ALfloat (*RESTRICT samp
maxi(samplesToDo, 512), 0, samplesToDo);
}
-} // namespace
struct FshifterStateFactory final : public EffectStateFactory {
EffectState *create() override;
+ ALeffectProps getDefaultProps() const noexcept override;
};
EffectState *FshifterStateFactory::create()
{ return new ALfshifterState{}; }
+ALeffectProps FshifterStateFactory::getDefaultProps() const noexcept
+{
+ ALeffectProps props{};
+ props.Fshifter.Frequency = AL_FREQUENCY_SHIFTER_DEFAULT_FREQUENCY;
+ props.Fshifter.LeftDirection = AL_FREQUENCY_SHIFTER_DEFAULT_LEFT_DIRECTION;
+ props.Fshifter.RightDirection = AL_FREQUENCY_SHIFTER_DEFAULT_RIGHT_DIRECTION;
+ return props;
+}
+
+} // namespace
+
EffectStateFactory *FshifterStateFactory_getFactory()
{
static FshifterStateFactory FshifterFactory{};