openalext_register.cpp 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*
  2. * WARNING: this is an autogenerated file and will be overwritten by
  3. * the extension interface script.
  4. */
  5. /*
  6. * This file contains the automatically generated loader-side
  7. * functions that form part of the extension.
  8. *
  9. * This file is awlays compiled into all loaders but compiles
  10. * to nothing if this extension is not enabled in the loader
  11. * at build time.
  12. */
  13. #include "openalext_autodefs.h"
  14. #include "s3eEdk.h"
  15. #include "openalext.h"
  16. //Declarations of Init and Term functions
  17. extern s3eResult openalextInit();
  18. extern void openalextTerminate();
  19. void openalextRegisterExt()
  20. {
  21. /* fill in the function pointer struct for this extension */
  22. void* funcPtrs[23];
  23. funcPtrs[0] = (void*)_alGetError;
  24. funcPtrs[1] = (void*)_alSourceQueueBuffers;
  25. funcPtrs[2] = (void*)_alSourceUnqueueBuffers;
  26. funcPtrs[3] = (void*)_alGetSourcei;
  27. funcPtrs[4] = (void*)_alGetSourcef;
  28. funcPtrs[5] = (void*)_alSourcef;
  29. funcPtrs[6] = (void*)_alSourcei;
  30. funcPtrs[7] = (void*)_alSourcePlay;
  31. funcPtrs[8] = (void*)_alSourceStop;
  32. funcPtrs[9] = (void*)_alSourcePause;
  33. funcPtrs[10] = (void*)_alGenSources;
  34. funcPtrs[11] = (void*)_alDeleteSources;
  35. funcPtrs[12] = (void*)_alGenBuffers;
  36. funcPtrs[13] = (void*)_alDeleteBuffers;
  37. funcPtrs[14] = (void*)_alBufferData;
  38. funcPtrs[15] = (void*)_alcOpenDevice;
  39. funcPtrs[16] = (void*)_alcCloseDevice;
  40. funcPtrs[17] = (void*)_alcCreateContext;
  41. funcPtrs[18] = (void*)_alcMakeContextCurrent;
  42. funcPtrs[19] = (void*)_alcProcessContext;
  43. funcPtrs[20] = (void*)_alcSuspendContext;
  44. funcPtrs[21] = (void*)_alcDestroyContext;
  45. funcPtrs[22] = (void*)_alcGetCurrentContext;
  46. /*
  47. * Flags that specify the extension's use of locking and stackswitching
  48. */
  49. int flags[23] = { 0 };
  50. /*
  51. * Register the extension
  52. */
  53. s3eEdkRegister("openalext", funcPtrs, sizeof(funcPtrs), flags, openalextInit, openalextTerminate, 0);
  54. }
  55. #if !defined S3E_BUILD_S3ELOADER
  56. #if defined S3E_EDK_USE_STATIC_INIT_ARRAY
  57. int openalextStaticInit()
  58. {
  59. void** p = g_StaticInitArray;
  60. void* end = p + g_StaticArrayLen;
  61. while (*p) p++;
  62. if (p < end)
  63. *p = (void*)&openalextRegisterExt;
  64. return 0;
  65. }
  66. int g_openalextVal = openalextStaticInit();
  67. #elif defined S3E_EDK_USE_DLLS
  68. S3E_EXTERN_C S3E_DLL_EXPORT void RegisterExt()
  69. {
  70. openalextRegisterExt();
  71. }
  72. #endif
  73. #endif