diff options
author | Chris Robinson <[email protected]> | 2022-07-07 22:11:38 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2022-07-07 22:11:38 -0700 |
commit | 1ad553b5a913e11c712eb95b7ecc7cbc66f4a274 (patch) | |
tree | 6b6a4608d62e38f820eae4840081912347880a70 /alc/alc.cpp | |
parent | edadd221ea71b0fd4ba58d231c7aead85af118ec (diff) |
Add a config compat option for NFC distance scaling
Currently there's no way for an application to specify the "real world" scale
for in-game units. If the game doesn't use one unit to represent what should be
perceived as one meter to the user, the NFC filter's effect will be too near or
too far sounding. This allows adjusting the unit scale as applied to the NFC
filters only, correcting the misalignment.
This also removes the influence of EFX's MetersPerUnit from the NFC filters,
since many games don't use it, and those that do won't know it also influences
the perceived wave curvature along with the air absorption strength.
Diffstat (limited to 'alc/alc.cpp')
-rw-r--r-- | alc/alc.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp index 6ee6c24a..07c9372c 100644 --- a/alc/alc.cpp +++ b/alc/alc.cpp @@ -1140,7 +1140,7 @@ void alc_initconfig(void) compatflags.set(CompatFlags::ReverseY, checkflag("__ALSOFT_REVERSE_Y", "reverse-y")); compatflags.set(CompatFlags::ReverseZ, checkflag("__ALSOFT_REVERSE_Z", "reverse-z")); - aluInit(compatflags); + aluInit(compatflags, ConfigValueFloat(nullptr, "game_compat", "nfc-scale").value_or(1.0f)); Voice::InitMixer(ConfigValueStr(nullptr, nullptr, "resampler")); auto traperr = al::getenv("ALSOFT_TRAP_ERROR"); |