From 32b9a46b39e3bfb3ccf1e05c520ce40232efa5d9 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 25 Nov 2020 13:55:29 -0800 Subject: Move AL EffectProp handling to separate sources --- alc/effects/dedicated.cpp | 58 ----------------------------------------------- 1 file changed, 58 deletions(-) (limited to 'alc/effects/dedicated.cpp') diff --git a/alc/effects/dedicated.cpp b/alc/effects/dedicated.cpp index 283d009a..8b9636ba 100644 --- a/alc/effects/dedicated.cpp +++ b/alc/effects/dedicated.cpp @@ -96,68 +96,10 @@ void DedicatedState::process(const size_t samplesToDo, const al::span= 0.0f && std::isfinite(val))) - throw effect_exception{AL_INVALID_VALUE, "Dedicated gain out of range"}; - props->Dedicated.Gain = val; - break; - - default: - throw effect_exception{AL_INVALID_ENUM, "Invalid dedicated float property 0x%04x", param}; - } -} -void Dedicated_setParamfv(EffectProps *props, ALenum param, const float *vals) -{ Dedicated_setParamf(props, param, vals[0]); } - -void Dedicated_getParami(const EffectProps*, ALenum param, int*) -{ throw effect_exception{AL_INVALID_ENUM, "Invalid dedicated integer property 0x%04x", param}; } -void Dedicated_getParamiv(const EffectProps*, ALenum param, int*) -{ - throw effect_exception{AL_INVALID_ENUM, "Invalid dedicated integer-vector property 0x%04x", - param}; -} -void Dedicated_getParamf(const EffectProps *props, ALenum param, float *val) -{ - switch(param) - { - case AL_DEDICATED_GAIN: - *val = props->Dedicated.Gain; - break; - - default: - throw effect_exception{AL_INVALID_ENUM, "Invalid dedicated float property 0x%04x", param}; - } -} -void Dedicated_getParamfv(const EffectProps *props, ALenum param, float *vals) -{ Dedicated_getParamf(props, param, vals); } - -DEFINE_ALEFFECT_VTABLE(Dedicated); - - struct DedicatedStateFactory final : public EffectStateFactory { EffectState *create() override { return new DedicatedState{}; } - EffectProps getDefaultProps() const noexcept override; - const EffectVtable *getEffectVtable() const noexcept override { return &Dedicated_vtable; } }; -EffectProps DedicatedStateFactory::getDefaultProps() const noexcept -{ - EffectProps props{}; - props.Dedicated.Gain = 1.0f; - return props; -} - } // namespace EffectStateFactory *DedicatedStateFactory_getFactory() -- cgit v1.2.3