Updated openal-soft to version 1.15.1

This commit is contained in:
fysx
2014-01-30 10:19:28 +01:00
parent 33d979caf6
commit f0fa37f4ad
164 changed files with 38848 additions and 21244 deletions
+32 -15
View File
@@ -22,27 +22,17 @@
#include <signal.h>
#ifdef HAVE_WINDOWS_H
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif
#include "alMain.h"
#include "AL/alc.h"
#include "alError.h"
ALboolean TrapALError = AL_FALSE;
AL_API ALenum AL_APIENTRY alGetError(void)
{
ALCcontext *Context;
ALenum errorCode;
Context = GetContextRef();
if(!Context) return AL_INVALID_OPERATION;
errorCode = ExchangeInt(&Context->LastError, AL_NO_ERROR);
ALCcontext_DecRef(Context);
return errorCode;
}
ALvoid alSetError(ALCcontext *Context, ALenum errorCode)
{
if(TrapALError)
@@ -57,3 +47,30 @@ ALvoid alSetError(ALCcontext *Context, ALenum errorCode)
}
CompExchangeInt(&Context->LastError, AL_NO_ERROR, errorCode);
}
AL_API ALenum AL_APIENTRY alGetError(void)
{
ALCcontext *Context;
ALenum errorCode;
Context = GetContextRef();
if(!Context)
{
if(TrapALError)
{
#ifdef _WIN32
if(IsDebuggerPresent())
DebugBreak();
#elif defined(SIGTRAP)
raise(SIGTRAP);
#endif
}
return AL_INVALID_OPERATION;
}
errorCode = ExchangeInt(&Context->LastError, AL_NO_ERROR);
ALCcontext_DecRef(Context);
return errorCode;
}