aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-09-22 05:42:04 -0700
committerChris Robinson <[email protected]>2017-09-22 05:42:04 -0700
commit369f52a0d76e1be1407441ca0bb67343cffa95f3 (patch)
treeab40abba1c463603f9401a7dc08cf207379b9794 /Alc/ALc.c
parent9007b7735519b049668ccd0c787ef52a00934386 (diff)
Add an option to ignore the app's speed of sound for reverb decay
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 7fcac99d..901b5447 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -885,6 +885,10 @@ static void alc_init(void)
if(str && (strcasecmp(str, "true") == 0 || strtol(str, NULL, 0) == 1))
ZScale *= -1.0f;
+ str = getenv("__ALSOFT_REVERB_IGNORES_SOUND_SPEED");
+ if(str && (strcasecmp(str, "true") == 0 || strtol(str, NULL, 0) == 1))
+ OverrideReverbSpeedOfSound = AL_TRUE;
+
ret = altss_create(&LocalContext, ReleaseThreadCtx);
assert(ret == althrd_success);
@@ -2540,6 +2544,7 @@ static ALvoid InitContext(ALCcontext *Context)
listener->Params.MetersPerUnit = listener->MetersPerUnit;
listener->Params.DopplerFactor = 1.0f;
listener->Params.SpeedOfSound = SPEEDOFSOUNDMETRESPERSEC;
+ listener->Params.ReverbSpeedOfSound = SPEEDOFSOUNDMETRESPERSEC;
ATOMIC_INIT(&listener->Update, NULL);
ATOMIC_INIT(&listener->FreeList, NULL);