7 #include "alc/effects/base.h"
11 #include "al/eax_exception.h"
17 void Null_setParami(EffectProps
* /*props*/, ALenum param
, int /*val*/)
22 throw effect_exception
{AL_INVALID_ENUM
, "Invalid null effect integer property 0x%04x",
26 void Null_setParamiv(EffectProps
*props
, ALenum param
, const int *vals
)
31 Null_setParami(props
, param
, vals
[0]);
34 void Null_setParamf(EffectProps
* /*props*/, ALenum param
, float /*val*/)
39 throw effect_exception
{AL_INVALID_ENUM
, "Invalid null effect float property 0x%04x",
43 void Null_setParamfv(EffectProps
*props
, ALenum param
, const float *vals
)
48 Null_setParamf(props
, param
, vals
[0]);
52 void Null_getParami(const EffectProps
* /*props*/, ALenum param
, int* /*val*/)
57 throw effect_exception
{AL_INVALID_ENUM
, "Invalid null effect integer property 0x%04x",
61 void Null_getParamiv(const EffectProps
*props
, ALenum param
, int *vals
)
66 Null_getParami(props
, param
, vals
);
69 void Null_getParamf(const EffectProps
* /*props*/, ALenum param
, float* /*val*/)
74 throw effect_exception
{AL_INVALID_ENUM
, "Invalid null effect float property 0x%04x",
78 void Null_getParamfv(const EffectProps
*props
, ALenum param
, float *vals
)
83 Null_getParamf(props
, param
, vals
);
87 EffectProps
genDefaultProps() noexcept
95 DEFINE_ALEFFECT_VTABLE(Null
);
97 const EffectProps NullEffectProps
{genDefaultProps()};
103 class EaxNullEffect final
:
111 const EaxEaxCall
& eax_call
) override
;
115 class EaxNullEffectException
:
119 explicit EaxNullEffectException(
122 EaxException
{"EAX_NULL_EFFECT", message
}
125 }; // EaxNullEffectException
128 EaxNullEffect::EaxNullEffect()
129 : EaxEffect
{AL_EFFECT_NULL
}
134 bool EaxNullEffect::dispatch(
135 const EaxEaxCall
& eax_call
)
137 if (eax_call
.get_property_id() != 0)
139 throw EaxNullEffectException
{"Unsupported property id."};
147 EaxEffectUPtr
eax_create_eax_null_effect()
149 return std::make_unique
<EaxNullEffect
>();