diff options
author | Chris Robinson <[email protected]> | 2017-09-22 05:42:04 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-09-22 05:42:04 -0700 |
commit | 369f52a0d76e1be1407441ca0bb67343cffa95f3 (patch) | |
tree | ab40abba1c463603f9401a7dc08cf207379b9794 /Alc/ALc.c | |
parent | 9007b7735519b049668ccd0c787ef52a00934386 (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.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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); |