aboutsummaryrefslogtreecommitdiffstats
path: root/alc/alc.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-05-05 01:01:30 -0700
committerChris Robinson <[email protected]>2020-05-05 01:05:38 -0700
commitdeac36a1ebc009e755ef999bcbcdc41323c84ef0 (patch)
treeace92f4838a67f8972648276992374776ba74eef /alc/alc.cpp
parentfcec76663f0ea24dd5d1f477f839ca2e781bf9b3 (diff)
Improve the front stablizer
Apply the all-pass+band-split only once, after generating the mid and side signals separately.
Diffstat (limited to 'alc/alc.cpp')
-rw-r--r--alc/alc.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp
index c7a24e42..acc99e6e 100644
--- a/alc/alc.cpp
+++ b/alc/alc.cpp
@@ -2096,13 +2096,10 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const int *attrList)
if(GetConfigValueBool(device->DeviceName.c_str(), nullptr, "front-stablizer", 0))
{
auto stablizer = std::make_unique<FrontStablizer>();
- /* Initialize band-splitting filters for the front-left and front-
- * right channels, with a crossover at 5khz (could be higher).
+ /* Initialize band-splitting filter for the mid signal, with a
+ * crossover at 5khz (could be higher).
*/
- const float scale{5000.0f / static_cast<float>(device->Frequency)};
-
- stablizer->LFilter.init(scale);
- stablizer->RFilter = stablizer->LFilter;
+ stablizer->MidFilter.init(5000.0f / static_cast<float>(device->Frequency));
device->Stablizer = std::move(stablizer);
/* NOTE: Don't know why this has to be "copied" into a local static