summaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-05-21 05:02:25 -0700
committerChris Robinson <[email protected]>2013-05-21 05:02:25 -0700
commit5c8c40afefc4e42635da91a876232cfc0975f6fd (patch)
treea05479e246a9494c1d590f9b080dee253c2505d9 /OpenAL32/Include
parent5516d8df0b21722c96189b946a8a10e9cbb0c001 (diff)
Auto-generate wrappers to upcast objects before calling user methods
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r--OpenAL32/Include/alAuxEffectSlot.h25
1 files changed, 17 insertions, 8 deletions
diff --git a/OpenAL32/Include/alAuxEffectSlot.h b/OpenAL32/Include/alAuxEffectSlot.h
index a891b52a..ed0d1887 100644
--- a/OpenAL32/Include/alAuxEffectSlot.h
+++ b/OpenAL32/Include/alAuxEffectSlot.h
@@ -12,10 +12,10 @@ typedef struct ALeffectState ALeffectState;
typedef struct ALeffectslot ALeffectslot;
struct ALeffectStateVtable {
- ALvoid (*const Destroy)(ALeffectState *State);
- ALboolean (*const DeviceUpdate)(ALeffectState *State, ALCdevice *Device);
- ALvoid (*const Update)(ALeffectState *State, ALCdevice *Device, const ALeffectslot *Slot);
- ALvoid (*const Process)(ALeffectState *State, ALuint SamplesToDo, const ALfloat *RESTRICT SamplesIn, ALfloat (*RESTRICT SamplesOut)[BUFFERSIZE]);
+ ALvoid (*const Destroy)(ALeffectState *state);
+ ALboolean (*const DeviceUpdate)(ALeffectState *state, ALCdevice *device);
+ ALvoid (*const Update)(ALeffectState *state, ALCdevice *device, const ALeffectslot *slot);
+ ALvoid (*const Process)(ALeffectState *state, ALuint samplesToDo, const ALfloat *RESTRICT samplesIn, ALfloat (*RESTRICT samplesOut)[BUFFERSIZE]);
};
struct ALeffectState {
@@ -23,11 +23,20 @@ struct ALeffectState {
};
#define DEFINE_ALEFFECTSTATE_VTABLE(T) \
+static ALvoid T##_ALeffectState_Destroy(ALeffectState *state) \
+{ T##_Destroy(STATIC_UPCAST(T, ALeffectState, state)); } \
+static ALboolean T##_ALeffectState_DeviceUpdate(ALeffectState *state, ALCdevice *device) \
+{ return T##_DeviceUpdate(STATIC_UPCAST(T, ALeffectState, state), device); } \
+static ALvoid T##_ALeffectState_Update(ALeffectState *state, ALCdevice *device, const ALeffectslot *slot) \
+{ T##_Update(STATIC_UPCAST(T, ALeffectState, state), device, slot); } \
+static ALvoid T##_ALeffectState_Process(ALeffectState *state, ALuint samplesToDo, const ALfloat *RESTRICT samplesIn, ALfloat (*RESTRICT samplesOut)[BUFFERSIZE]) \
+{ T##_Process(STATIC_UPCAST(T, ALeffectState, state), samplesToDo, samplesIn, samplesOut); } \
+ \
static const struct ALeffectStateVtable T##_ALeffectState_vtable = { \
- T##_Destroy, \
- T##_DeviceUpdate, \
- T##_Update, \
- T##_Process \
+ T##_ALeffectState_Destroy, \
+ T##_ALeffectState_DeviceUpdate, \
+ T##_ALeffectState_Update, \
+ T##_ALeffectState_Process \
}
#define SET_VTABLE1(T1, obj) ((obj)->vtbl = &(T1##_vtable))