aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects/pshifter.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/pshifter.cpp
parent935f386982f9d0d94fdf569b0cb1aa43fbfadefa (diff)
Implement getDefaultProps for effect state factories
Diffstat (limited to 'Alc/effects/pshifter.cpp')
-rw-r--r--Alc/effects/pshifter.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/Alc/effects/pshifter.cpp b/Alc/effects/pshifter.cpp
index aa7dae87..05add42a 100644
--- a/Alc/effects/pshifter.cpp
+++ b/Alc/effects/pshifter.cpp
@@ -325,15 +325,25 @@ void ALpshifterState::process(ALsizei samplesToDo, const ALfloat (*RESTRICT samp
maxi(samplesToDo, 512), 0, samplesToDo);
}
-} // namespace
struct PshifterStateFactory final : public EffectStateFactory {
EffectState *create() override;
+ ALeffectProps getDefaultProps() const noexcept override;
};
EffectState *PshifterStateFactory::create()
{ return new ALpshifterState{}; }
+ALeffectProps PshifterStateFactory::getDefaultProps() const noexcept
+{
+ ALeffectProps props{};
+ props.Pshifter.CoarseTune = AL_PITCH_SHIFTER_DEFAULT_COARSE_TUNE;
+ props.Pshifter.FineTune = AL_PITCH_SHIFTER_DEFAULT_FINE_TUNE;
+ return props;
+}
+
+} // namespace
+
EffectStateFactory *PshifterStateFactory_getFactory()
{
static PshifterStateFactory PshifterFactory{};