openalext_platform.mm 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. /*
  2. * windows-specific implementation of the openalext extension.
  3. * Add any platform-specific functionality here.
  4. */
  5. /*
  6. * NOTE: This file was originally written by the extension builder, but will not
  7. * be overwritten (unless --force is specified) and is intended to be modified.
  8. */
  9. #include "openalext_internal.h"
  10. #import <OpenAL/al.h>
  11. #import <OpenAL/alc.h>
  12. s3eResult openalextInit_platform()
  13. {
  14. // Add any platform-specific initialisation code here
  15. return S3E_RESULT_SUCCESS;
  16. }
  17. void openalextTerminate_platform()
  18. {
  19. // Add any platform-specific termination code here
  20. }
  21. unsigned int _alGetError_platform()
  22. {
  23. return alGetError();
  24. }
  25. void _alSourceQueueBuffers_platform(_ALuint sid, _ALsizei numEntries, const _ALuint* bids)
  26. {
  27. alSourceQueueBuffers(sid, numEntries, bids);
  28. }
  29. void _alSourceUnqueueBuffers_platform(_ALuint sid, _ALsizei numEntries, _ALuint* bids)
  30. {
  31. alSourceUnqueueBuffers(sid, numEntries, bids);
  32. }
  33. void _alGetSourcei_platform(_ALuint sid, _ALenum param, _ALint* value)
  34. {
  35. alGetSourcei(sid, param, value);
  36. }
  37. void _alGetSourcef_platform(_ALuint sid, _ALenum param, _ALfloat* value)
  38. {
  39. alGetSourcef(sid, param, value);
  40. }
  41. void _alSourcef_platform(_ALuint sid, _ALenum param, _ALfloat value)
  42. {
  43. alSourcef(sid, param, value);
  44. }
  45. void _alSourcei_platform(_ALuint sid, _ALenum param, _ALint value)
  46. {
  47. alSourcei(sid, param, value);
  48. }
  49. void _alSourcePlay_platform(_ALuint sid)
  50. {
  51. alSourcePlay(sid);
  52. }
  53. void _alSourceStop_platform(_ALuint sid)
  54. {
  55. alSourceStop(sid);
  56. }
  57. void _alSourcePause_platform(_ALuint sid)
  58. {
  59. alSourcePause(sid);
  60. }
  61. void _alGenSources_platform(_ALsizei n, _ALuint* sources)
  62. {
  63. alGenSources(n, sources);
  64. }
  65. void _alDeleteSources_platform(_ALsizei n, const _ALuint* sources)
  66. {
  67. alDeleteSources(n, sources);
  68. }
  69. void _alGenBuffers_platform(_ALsizei n, _ALuint* buffers)
  70. {
  71. alGenBuffers(n, buffers);
  72. }
  73. void _alDeleteBuffers_platform(_ALsizei n, const _ALuint* buffers)
  74. {
  75. alDeleteBuffers(n, buffers);
  76. }
  77. void _alBufferData_platform(_ALuint bid, _ALenum format, const _ALvoid* data, _ALsizei size, _ALsizei freq)
  78. {
  79. alBufferData(bid, format, data, size, freq);
  80. }
  81. _ALCdevice* _alcOpenDevice_platform(const char* devicename)
  82. {
  83. return (_ALCdevice*)alcOpenDevice(devicename);
  84. }
  85. void _alcCloseDevice_platform(_ALCdevice* device)
  86. {
  87. alcCloseDevice((ALCdevice*)device);
  88. }
  89. _ALCcontext * _alcCreateContext_platform(_ALCdevice* device, const _ALCint* attrlist)
  90. {
  91. return (_ALCcontext *)alcCreateContext((ALCdevice*)device, attrlist);
  92. }
  93. _ALCboolean _alcMakeContextCurrent_platform(_ALCcontext* context)
  94. {
  95. return alcMakeContextCurrent((ALCcontext*)context);
  96. }
  97. void _alcProcessContext_platform(_ALCcontext* context)
  98. {
  99. alcProcessContext((ALCcontext*)context);
  100. }
  101. void _alcSuspendContext_platform(_ALCcontext* context)
  102. {
  103. alcSuspendContext((ALCcontext*)context);
  104. }
  105. void _alcDestroyContext_platform(_ALCcontext* context)
  106. {
  107. alcDestroyContext((ALCcontext*)context);
  108. }
  109. _ALCcontext * _alcGetCurrentContext_platform()
  110. {
  111. return (_ALCcontext*)alcGetCurrentContext();
  112. }