aboutsummaryrefslogtreecommitdiffstats
path: root/alc/alc.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-10-21 10:33:41 -0700
committerChris Robinson <[email protected]>2022-10-21 10:33:41 -0700
commitee40a2e7e4867a769765d447a15ac88832eb8aa0 (patch)
tree0ff9157bc237db41795d27dd731b0191289bb5e2 /alc/alc.cpp
parent53b63f329c3daa82f3c02ed43b67338af3a3d77d (diff)
Add an IIR filter option for UHJ encoding/decoding
This uses the reversed-allpass trick to maintain linear phase. with a 256- sample look-ahead/delay to minimize distortion. This should better preserve low frequencies while maintaining a proper phase response.
Diffstat (limited to 'alc/alc.cpp')
-rw-r--r--alc/alc.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp
index e89ad598..1f70569a 100644
--- a/alc/alc.cpp
+++ b/alc/alc.cpp
@@ -1148,9 +1148,11 @@ void alc_initconfig(void)
if(auto uhjfiltopt = ConfigValueStr(nullptr, "uhj", "filter"))
{
if(al::strcasecmp(uhjfiltopt->c_str(), "fir256") == 0)
- UhjQuality = UhjLengthLq;
+ UhjQuality = UhjQualityType::FIR256;
else if(al::strcasecmp(uhjfiltopt->c_str(), "fir512") == 0)
- UhjQuality = UhjLengthHq;
+ UhjQuality = UhjQualityType::FIR512;
+ else if(al::strcasecmp(uhjfiltopt->c_str(), "iir") == 0)
+ UhjQuality = UhjQualityType::IIR;
else
WARN("Unsupported uhj/filter: %s\n", uhjfiltopt->c_str());
}