summaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include/alThunk.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2007-11-13 18:02:18 -0800
committerChris Robinson <[email protected]>2007-11-13 18:02:18 -0800
commitae5f4e9a742b07e004b330c04a72fac4457c9b58 (patch)
treed1d5c9fadd918d9346fb871033f60e8c91600a63 /OpenAL32/Include/alThunk.h
Initial import
Diffstat (limited to 'OpenAL32/Include/alThunk.h')
-rw-r--r--OpenAL32/Include/alThunk.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/OpenAL32/Include/alThunk.h b/OpenAL32/Include/alThunk.h
new file mode 100644
index 00000000..2ed32871
--- /dev/null
+++ b/OpenAL32/Include/alThunk.h
@@ -0,0 +1,42 @@
+#ifndef _AL_THUNK_H_
+#define _AL_THUNK_H_
+
+#include "config.h"
+
+#include "AL/al.h"
+#include "AL/alc.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if (SIZEOF_VOIDP > SIZEOF_UINT)
+
+void alThunkInit(void);
+void alThunkExit(void);
+ALuint alThunkAddEntry(ALvoid * ptr);
+void alThunkRemoveEntry(ALuint index);
+ALvoid *alThunkLookupEntry(ALuint index);
+
+#define ALTHUNK_INIT() alThunkInit()
+#define ALTHUNK_EXIT() alThunkExit()
+#define ALTHUNK_ADDENTRY(p) alThunkAddEntry(p)
+#define ALTHUNK_REMOVEENTRY(i) alThunkRemoveEntry(i)
+#define ALTHUNK_LOOKUPENTRY(i) alThunkLookupEntry(i)
+
+#else
+
+#define ALTHUNK_INIT()
+#define ALTHUNK_EXIT()
+#define ALTHUNK_ADDENTRY(p) ((ALuint)p)
+#define ALTHUNK_REMOVEENTRY(i)
+#define ALTHUNK_LOOKUPENTRY(i) ((ALvoid*)(i))
+
+#endif // (SIZEOF_VOIDP > SIZEOF_INT)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //_AL_THUNK_H_
+