diff options
author | Chris Robinson <[email protected]> | 2020-04-10 18:26:08 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-04-10 18:26:08 -0700 |
commit | 13153bab607e30fb2f676cc6070391453b884faa (patch) | |
tree | a15ed176f47b4797a374dece09253c54104d5168 /alc | |
parent | f7380a44d4c5c6345602db8630ae7bbd971cac1d (diff) |
Add an effect_exception for handling effect properties
Diffstat (limited to 'alc')
-rw-r--r-- | alc/effects/base.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/alc/effects/base.h b/alc/effects/base.h index 5d77e904..76ead78f 100644 --- a/alc/effects/base.h +++ b/alc/effects/base.h @@ -4,6 +4,7 @@ #include <cstddef> #include "alcmain.h" +#include "alexcpt.h" #include "almalloc.h" #include "alspan.h" #include "atomic.h" @@ -125,6 +126,19 @@ union EffectProps { }; +class effect_exception final : public al::base_exception { +public: + [[gnu::format(printf, 3, 4)]] + effect_exception(ALenum code, const char *msg, ...) : base_exception{code} + { + va_list args; + va_start(args, msg); + setMessage(msg, args); + va_end(args); + } +}; + + struct EffectVtable { void (*const setParami)(EffectProps *props, ALCcontext *context, ALenum param, int val); void (*const setParamiv)(EffectProps *props, ALCcontext *context, ALenum param, const int *vals); |