diff options
author | Chris Robinson <[email protected]> | 2011-09-10 01:12:34 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-09-10 01:12:34 -0700 |
commit | 724ad0d89381456771c672b68b72bb07042b2173 (patch) | |
tree | f8b5c8ffcfd64d0ff03cdeb64edceef41852e7c2 /Alc/ALc.c | |
parent | 7a0df8553fbf879f94c372aed3d7b5dfab25ad6c (diff) |
Add an option to trap context errors in a debugger
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r-- | Alc/ALc.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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); |