mirror of
https://github.com/love2d/megasource.git
synced 2026-08-18 19:54:37 +02:00
Update OpenAL-Soft to 1.22.0
This commit is contained in:
@@ -118,40 +118,6 @@ static const std::array<FuncExportEntry,128> alcFunctions{{
|
||||
DECL(alDopplerVelocity),
|
||||
DECL(alSpeedOfSound),
|
||||
DECL(alDistanceModel),
|
||||
|
||||
DECL(alGenFilters),
|
||||
DECL(alDeleteFilters),
|
||||
DECL(alIsFilter),
|
||||
DECL(alFilterf),
|
||||
DECL(alFilterfv),
|
||||
DECL(alFilteri),
|
||||
DECL(alFilteriv),
|
||||
DECL(alGetFilterf),
|
||||
DECL(alGetFilterfv),
|
||||
DECL(alGetFilteri),
|
||||
DECL(alGetFilteriv),
|
||||
DECL(alGenEffects),
|
||||
DECL(alDeleteEffects),
|
||||
DECL(alIsEffect),
|
||||
DECL(alEffectf),
|
||||
DECL(alEffectfv),
|
||||
DECL(alEffecti),
|
||||
DECL(alEffectiv),
|
||||
DECL(alGetEffectf),
|
||||
DECL(alGetEffectfv),
|
||||
DECL(alGetEffecti),
|
||||
DECL(alGetEffectiv),
|
||||
DECL(alGenAuxiliaryEffectSlots),
|
||||
DECL(alDeleteAuxiliaryEffectSlots),
|
||||
DECL(alIsAuxiliaryEffectSlot),
|
||||
DECL(alAuxiliaryEffectSlotf),
|
||||
DECL(alAuxiliaryEffectSlotfv),
|
||||
DECL(alAuxiliaryEffectSloti),
|
||||
DECL(alAuxiliaryEffectSlotiv),
|
||||
DECL(alGetAuxiliaryEffectSlotf),
|
||||
DECL(alGetAuxiliaryEffectSlotfv),
|
||||
DECL(alGetAuxiliaryEffectSloti),
|
||||
DECL(alGetAuxiliaryEffectSlotiv),
|
||||
}};
|
||||
#undef DECL
|
||||
|
||||
@@ -469,21 +435,21 @@ ALC_API ALCboolean ALC_APIENTRY alcMakeContextCurrent(ALCcontext *context)
|
||||
*/
|
||||
if(idx < 0)
|
||||
{
|
||||
DriverIface *oldiface = ThreadCtxDriver;
|
||||
DriverIface *oldiface = GetThreadDriver();
|
||||
if(oldiface) oldiface->alcSetThreadContext(nullptr);
|
||||
oldiface = CurrentCtxDriver.exchange(nullptr);
|
||||
if(oldiface) oldiface->alcMakeContextCurrent(nullptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
DriverIface *oldiface = ThreadCtxDriver;
|
||||
DriverIface *oldiface = GetThreadDriver();
|
||||
if(oldiface && oldiface != &DriverList[idx])
|
||||
oldiface->alcSetThreadContext(nullptr);
|
||||
oldiface = CurrentCtxDriver.exchange(&DriverList[idx]);
|
||||
if(oldiface && oldiface != &DriverList[idx])
|
||||
oldiface->alcMakeContextCurrent(nullptr);
|
||||
}
|
||||
ThreadCtxDriver = nullptr;
|
||||
SetThreadDriver(nullptr);
|
||||
|
||||
return ALC_TRUE;
|
||||
}
|
||||
@@ -526,7 +492,7 @@ ALC_API void ALC_APIENTRY alcDestroyContext(ALCcontext *context)
|
||||
|
||||
ALC_API ALCcontext* ALC_APIENTRY alcGetCurrentContext(void)
|
||||
{
|
||||
DriverIface *iface = ThreadCtxDriver;
|
||||
DriverIface *iface = GetThreadDriver();
|
||||
if(!iface) iface = CurrentCtxDriver.load();
|
||||
return iface ? iface->alcGetCurrentContext() : nullptr;
|
||||
}
|
||||
@@ -932,10 +898,10 @@ ALC_API ALCboolean ALC_APIENTRY alcSetThreadContext(ALCcontext *context)
|
||||
|
||||
if(!context)
|
||||
{
|
||||
DriverIface *oldiface = ThreadCtxDriver;
|
||||
DriverIface *oldiface = GetThreadDriver();
|
||||
if(oldiface && !oldiface->alcSetThreadContext(nullptr))
|
||||
return ALC_FALSE;
|
||||
ThreadCtxDriver = nullptr;
|
||||
SetThreadDriver(nullptr);
|
||||
return ALC_TRUE;
|
||||
}
|
||||
|
||||
@@ -944,10 +910,10 @@ ALC_API ALCboolean ALC_APIENTRY alcSetThreadContext(ALCcontext *context)
|
||||
{
|
||||
if(DriverList[idx].alcSetThreadContext(context))
|
||||
{
|
||||
DriverIface *oldiface = ThreadCtxDriver;
|
||||
DriverIface *oldiface = GetThreadDriver();
|
||||
if(oldiface != &DriverList[idx])
|
||||
{
|
||||
ThreadCtxDriver = &DriverList[idx];
|
||||
SetThreadDriver(&DriverList[idx]);
|
||||
if(oldiface) oldiface->alcSetThreadContext(nullptr);
|
||||
}
|
||||
return ALC_TRUE;
|
||||
@@ -960,7 +926,7 @@ ALC_API ALCboolean ALC_APIENTRY alcSetThreadContext(ALCcontext *context)
|
||||
|
||||
ALC_API ALCcontext* ALC_APIENTRY alcGetThreadContext(void)
|
||||
{
|
||||
DriverIface *iface = ThreadCtxDriver;
|
||||
DriverIface *iface = GetThreadDriver();
|
||||
if(iface) return iface->alcGetThreadContext();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user