aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 339b5907..757514a3 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -34,6 +34,7 @@
#include "alSource.h"
#include "alBuffer.h"
#include "alAuxEffectSlot.h"
+#include "alError.h"
#include "bs2b.h"
#include "alu.h"
@@ -498,6 +499,10 @@ static void alc_init(void)
if(str && (strcasecmp(str, "true") == 0 || strtol(str, NULL, 0) == 1))
ZScale = -1.0;
+ str = getenv("__ALSOFT_TRAP_AL_ERROR");
+ if(str && (strcasecmp(str, "true") == 0 || strtol(str, NULL, 0) == 1))
+ TrapALError = AL_TRUE;
+
pthread_key_create(&LocalContext, ReleaseThreadCtx);
InitializeCriticalSection(&ListLock);
ThunkInit();
@@ -569,6 +574,9 @@ static void alc_initconfig(void)
if(DefaultResampler >= RESAMPLER_MAX || DefaultResampler <= RESAMPLER_MIN)
DefaultResampler = RESAMPLER_DEFAULT;
+ if(!TrapALError)
+ TrapALError = GetConfigValueBool(NULL, "trap-al-error", AL_FALSE);
+
ReverbBoost *= aluPow(10.0f, GetConfigValueFloat("reverb", "boost", 0.0f) /
20.0f);
EmulateEAXReverb = GetConfigValueBool("reverb", "emulate-eax", AL_FALSE);