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 /OpenAL32 | |
parent | 935f386982f9d0d94fdf569b0cb1aa43fbfadefa (diff) |
Implement getDefaultProps for effect state factories
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/Include/alAuxEffectSlot.h | 2 | ||||
-rw-r--r-- | OpenAL32/alAuxEffectSlot.cpp | 6 | ||||
-rw-r--r-- | OpenAL32/alEffect.cpp | 2 |
3 files changed, 3 insertions, 7 deletions
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; |