mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 23:54:35 +00:00
update openal
This commit is contained in:
parent
62f3b93ff9
commit
6721a6b021
287 changed files with 33851 additions and 27325 deletions
|
|
@ -1,39 +1,42 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <cstddef>
|
||||
|
||||
#include "AL/al.h"
|
||||
#include "router.h"
|
||||
|
||||
|
||||
std::atomic<DriverIface*> CurrentCtxDriver{nullptr};
|
||||
|
||||
#define DECL_THUNK1(R,n,T1) AL_API R AL_APIENTRY n(T1 a) \
|
||||
#define DECL_THUNK1(R,n,T1) \
|
||||
AL_API auto AL_APIENTRY n(T1 a) noexcept -> R \
|
||||
{ \
|
||||
DriverIface *iface = GetThreadDriver(); \
|
||||
if(!iface) iface = CurrentCtxDriver.load(std::memory_order_acquire); \
|
||||
return iface->n(a); \
|
||||
}
|
||||
#define DECL_THUNK2(R,n,T1,T2) AL_API R AL_APIENTRY n(T1 a, T2 b) \
|
||||
#define DECL_THUNK2(R,n,T1,T2) \
|
||||
AL_API auto AL_APIENTRY n(T1 a, T2 b) noexcept -> R \
|
||||
{ \
|
||||
DriverIface *iface = GetThreadDriver(); \
|
||||
if(!iface) iface = CurrentCtxDriver.load(std::memory_order_acquire); \
|
||||
return iface->n(a, b); \
|
||||
}
|
||||
#define DECL_THUNK3(R,n,T1,T2,T3) AL_API R AL_APIENTRY n(T1 a, T2 b, T3 c) \
|
||||
#define DECL_THUNK3(R,n,T1,T2,T3) \
|
||||
AL_API auto AL_APIENTRY n(T1 a, T2 b, T3 c) noexcept -> R \
|
||||
{ \
|
||||
DriverIface *iface = GetThreadDriver(); \
|
||||
if(!iface) iface = CurrentCtxDriver.load(std::memory_order_acquire); \
|
||||
return iface->n(a, b, c); \
|
||||
}
|
||||
#define DECL_THUNK4(R,n,T1,T2,T3,T4) AL_API R AL_APIENTRY n(T1 a, T2 b, T3 c, T4 d) \
|
||||
#define DECL_THUNK4(R,n,T1,T2,T3,T4) \
|
||||
AL_API auto AL_APIENTRY n(T1 a, T2 b, T3 c, T4 d) noexcept -> R \
|
||||
{ \
|
||||
DriverIface *iface = GetThreadDriver(); \
|
||||
if(!iface) iface = CurrentCtxDriver.load(std::memory_order_acquire); \
|
||||
return iface->n(a, b, c, d); \
|
||||
}
|
||||
#define DECL_THUNK5(R,n,T1,T2,T3,T4,T5) AL_API R AL_APIENTRY n(T1 a, T2 b, T3 c, T4 d, T5 e) \
|
||||
#define DECL_THUNK5(R,n,T1,T2,T3,T4,T5) \
|
||||
AL_API auto AL_APIENTRY n(T1 a, T2 b, T3 c, T4 d, T5 e) noexcept -> R \
|
||||
{ \
|
||||
DriverIface *iface = GetThreadDriver(); \
|
||||
if(!iface) iface = CurrentCtxDriver.load(std::memory_order_acquire); \
|
||||
|
|
@ -44,7 +47,7 @@ std::atomic<DriverIface*> CurrentCtxDriver{nullptr};
|
|||
/* Ugly hack for some apps calling alGetError without a current context, and
|
||||
* expecting it to be AL_NO_ERROR.
|
||||
*/
|
||||
AL_API ALenum AL_APIENTRY alGetError(void)
|
||||
AL_API auto AL_APIENTRY alGetError() noexcept -> ALenum
|
||||
{
|
||||
DriverIface *iface = GetThreadDriver();
|
||||
if(!iface) iface = CurrentCtxDriver.load(std::memory_order_acquire);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue