alThunk.h 865 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef _AL_THUNK_H_
  2. #define _AL_THUNK_H_
  3. #include "config.h"
  4. #include "AL/al.h"
  5. #include "AL/alc.h"
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9. void alThunkInit(void);
  10. void alThunkExit(void);
  11. ALuint alThunkAddEntry(ALvoid * ptr);
  12. void alThunkRemoveEntry(ALuint index);
  13. ALvoid *alThunkLookupEntry(ALuint index);
  14. #if (SIZEOF_VOIDP > SIZEOF_UINT)
  15. #define ALTHUNK_INIT() alThunkInit()
  16. #define ALTHUNK_EXIT() alThunkExit()
  17. #define ALTHUNK_ADDENTRY(p) alThunkAddEntry(p)
  18. #define ALTHUNK_REMOVEENTRY(i) alThunkRemoveEntry(i)
  19. #define ALTHUNK_LOOKUPENTRY(i) alThunkLookupEntry(i)
  20. #else
  21. #define ALTHUNK_INIT()
  22. #define ALTHUNK_EXIT()
  23. #define ALTHUNK_ADDENTRY(p) ((ALuint)p)
  24. #define ALTHUNK_REMOVEENTRY(i)
  25. #define ALTHUNK_LOOKUPENTRY(i) ((ALvoid*)(i))
  26. #endif // (SIZEOF_VOIDP > SIZEOF_INT)
  27. #ifdef __cplusplus
  28. }
  29. #endif
  30. #endif //_AL_THUNK_H_