From f951f4a66b3e9cc8db7ab190b8443fa6c834fee7 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 22 Mar 2019 12:58:24 -0700 Subject: Implement getDefaultProps for effect state factories --- OpenAL32/Include/alAuxEffectSlot.h | 2 +- OpenAL32/alAuxEffectSlot.cpp | 6 +----- OpenAL32/alEffect.cpp | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) (limited to 'OpenAL32') diff --git a/OpenAL32/Include/alAuxEffectSlot.h b/OpenAL32/Include/alAuxEffectSlot.h index 387c6462..7d5775d4 100644 --- a/OpenAL32/Include/alAuxEffectSlot.h +++ b/OpenAL32/Include/alAuxEffectSlot.h @@ -42,7 +42,7 @@ struct EffectStateFactory { virtual ~EffectStateFactory() { } virtual EffectState *create() = 0; - virtual ALeffectProps getDefaultProps() const; + virtual ALeffectProps getDefaultProps() const noexcept = 0; }; diff --git a/OpenAL32/alAuxEffectSlot.cpp b/OpenAL32/alAuxEffectSlot.cpp index 771ed740..473c7240 100644 --- a/OpenAL32/alAuxEffectSlot.cpp +++ b/OpenAL32/alAuxEffectSlot.cpp @@ -171,7 +171,7 @@ constexpr struct FactoryItem { { AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT, DedicatedStateFactory_getFactory } }; -inline EffectStateFactory *getFactoryByType(ALenum type) +EffectStateFactory *getFactoryByType(ALenum type) { auto iter = std::find_if(std::begin(FactoryList), std::end(FactoryList), [type](const FactoryItem &item) noexcept -> bool @@ -690,10 +690,6 @@ ALenum InitializeEffect(ALCcontext *Context, ALeffectslot *EffectSlot, ALeffect } -ALeffectProps EffectStateFactory::getDefaultProps() const -{ return ALeffectProps{}; } - - void EffectState::IncRef() noexcept { auto ref = IncrementRef(&mRef); diff --git a/OpenAL32/alEffect.cpp b/OpenAL32/alEffect.cpp index f9b94c75..0c11af98 100644 --- a/OpenAL32/alEffect.cpp +++ b/OpenAL32/alEffect.cpp @@ -178,7 +178,7 @@ void InitEffectParams(ALeffect *effect, ALenum type) effect->Props.Chorus.Delay = AL_FLANGER_DEFAULT_DELAY; effect->vtab = &ALflanger_vtable; break; - case AL_EFFECT_FREQUENCY_SHIFTER: + case AL_EFFECT_FREQUENCY_SHIFTER: effect->Props.Fshifter.Frequency = AL_FREQUENCY_SHIFTER_DEFAULT_FREQUENCY; effect->Props.Fshifter.LeftDirection = AL_FREQUENCY_SHIFTER_DEFAULT_LEFT_DIRECTION; effect->Props.Fshifter.RightDirection = AL_FREQUENCY_SHIFTER_DEFAULT_RIGHT_DIRECTION; -- cgit v1.2.3