9 #include "alc/effects/base.h"
15 void Dedicated_setParami(EffectProps*, ALenum param, int)
16 { throw effect_exception{AL_INVALID_ENUM, "Invalid dedicated integer property 0x%04x", param}; }
17 void Dedicated_setParamiv(EffectProps*, ALenum param, const int*)
19 throw effect_exception{AL_INVALID_ENUM, "Invalid dedicated integer-vector property 0x%04x",
22 void Dedicated_setParamf(EffectProps *props, ALenum param, float val)
26 case AL_DEDICATED_GAIN:
27 if(!(val >= 0.0f && std::isfinite(val)))
28 throw effect_exception{AL_INVALID_VALUE, "Dedicated gain out of range"};
29 props->Dedicated.Gain = val;
33 throw effect_exception{AL_INVALID_ENUM, "Invalid dedicated float property 0x%04x", param};
36 void Dedicated_setParamfv(EffectProps *props, ALenum param, const float *vals)
37 { Dedicated_setParamf(props, param, vals[0]); }
39 void Dedicated_getParami(const EffectProps*, ALenum param, int*)
40 { throw effect_exception{AL_INVALID_ENUM, "Invalid dedicated integer property 0x%04x", param}; }
41 void Dedicated_getParamiv(const EffectProps*, ALenum param, int*)
43 throw effect_exception{AL_INVALID_ENUM, "Invalid dedicated integer-vector property 0x%04x",
46 void Dedicated_getParamf(const EffectProps *props, ALenum param, float *val)
50 case AL_DEDICATED_GAIN:
51 *val = props->Dedicated.Gain;
55 throw effect_exception{AL_INVALID_ENUM, "Invalid dedicated float property 0x%04x", param};
58 void Dedicated_getParamfv(const EffectProps *props, ALenum param, float *vals)
59 { Dedicated_getParamf(props, param, vals); }
61 EffectProps genDefaultProps() noexcept
64 props.Dedicated.Gain = 1.0f;
70 DEFINE_ALEFFECT_VTABLE(Dedicated);
72 const EffectProps DedicatedEffectProps{genDefaultProps()};