aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r--OpenAL32/Include/alAuxEffectSlot.h5
-rw-r--r--OpenAL32/Include/alEffect.h10
-rw-r--r--OpenAL32/Include/alMain.h12
3 files changed, 10 insertions, 17 deletions
diff --git a/OpenAL32/Include/alAuxEffectSlot.h b/OpenAL32/Include/alAuxEffectSlot.h
index 24614fa4..d496df8d 100644
--- a/OpenAL32/Include/alAuxEffectSlot.h
+++ b/OpenAL32/Include/alAuxEffectSlot.h
@@ -26,11 +26,6 @@ struct ALeffectState {
const struct ALeffectStateVtable *vtbl;
};
-#define ALeffectState_Destruct(a) ((a)->vtbl->Destruct((a)))
-#define ALeffectState_DeviceUpdate(a,b) ((a)->vtbl->DeviceUpdate((a),(b)))
-#define ALeffectState_Update(a,b,c) ((a)->vtbl->Update((a),(b),(c)))
-#define ALeffectState_Process(a,b,c,d) ((a)->vtbl->Process((a),(b),(c),(d)))
-
#define DEFINE_ALEFFECTSTATE_VTABLE(T) \
static ALvoid T##_ALeffectState_Destruct(ALeffectState *state) \
{ T##_Destruct(STATIC_UPCAST(T, ALeffectState, state)); } \
diff --git a/OpenAL32/Include/alEffect.h b/OpenAL32/Include/alEffect.h
index 6399ff38..a685681e 100644
--- a/OpenAL32/Include/alEffect.h
+++ b/OpenAL32/Include/alEffect.h
@@ -162,16 +162,6 @@ typedef struct ALeffect {
ALuint id;
} ALeffect;
-#define ALeffect_SetParami(x, c, p, v) ((x)->vtbl->SetParami((x),(c),(p),(v)))
-#define ALeffect_SetParamiv(x, c, p, v) ((x)->vtbl->SetParamiv((x),(c),(p),(v)))
-#define ALeffect_SetParamf(x, c, p, v) ((x)->vtbl->SetParamf((x),(c),(p),(v)))
-#define ALeffect_SetParamfv(x, c, p, v) ((x)->vtbl->SetParamfv((x),(c),(p),(v)))
-
-#define ALeffect_GetParami(x, c, p, v) ((x)->vtbl->GetParami((x),(c),(p),(v)))
-#define ALeffect_GetParamiv(x, c, p, v) ((x)->vtbl->GetParamiv((x),(c),(p),(v)))
-#define ALeffect_GetParamf(x, c, p, v) ((x)->vtbl->GetParamf((x),(c),(p),(v)))
-#define ALeffect_GetParamfv(x, c, p, v) ((x)->vtbl->GetParamfv((x),(c),(p),(v)))
-
static __inline ALboolean IsReverbEffect(ALenum type)
{ return type == AL_EFFECT_REVERB || type == AL_EFFECT_EAXREVERB; }
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index a7c79b2a..16df2330 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -70,9 +70,17 @@ static const union {
#define SET_VTABLE1(T1, obj) ((obj)->vtbl = &(T1##_vtable))
#define SET_VTABLE2(T1, T2, obj) SET_VTABLE1(T1##_##T2, STATIC_CAST(T2, (obj)))
+/* Helper to extract an argument list for VCALL. Not used directly. */
+#define EXTRACT_VCALL_ARGS(...) __VA_ARGS__
+
+/* Call a "virtual" method on an object, with arguments. */
+#define VCALL(obj, func, args) (((obj)->vtbl->func)((obj), EXTRACT_VCALL_ARGS args))
+/* Call a "virtual" method on an object, with no arguments. */
+#define VCALL_NOARGS(obj, func) (((obj)->vtbl->func)((obj)))
+
#define DELETE_OBJ(obj) do { \
- (obj)->vtbl->Destruct((obj)); \
- (obj)->vtbl->Delete((obj)); \
+ VCALL_NOARGS((obj),Destruct); \
+ VCALL_NOARGS((obj),Delete); \
} while(0)