aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-04-10 18:26:08 -0700
committerChris Robinson <[email protected]>2020-04-10 18:26:08 -0700
commit13153bab607e30fb2f676cc6070391453b884faa (patch)
treea15ed176f47b4797a374dece09253c54104d5168 /alc
parentf7380a44d4c5c6345602db8630ae7bbd971cac1d (diff)
Add an effect_exception for handling effect properties
Diffstat (limited to 'alc')
-rw-r--r--alc/effects/base.h14
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);