aboutsummaryrefslogtreecommitdiffstats
path: root/alc/alc.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-05-05 01:31:21 -0700
committerChris Robinson <[email protected]>2020-05-05 01:34:14 -0700
commitee82db3966acf728935d2a9d26bb5b2ade62e368 (patch)
treef77da324bcf37847793fe03d92f93f2ce95926b9 /alc/alc.cpp
parentdeac36a1ebc009e755ef999bcbcdc41323c84ef0 (diff)
Use a flexible array for the front stablizer delay buffers
Diffstat (limited to 'alc/alc.cpp')
-rw-r--r--alc/alc.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp
index acc99e6e..040bffa6 100644
--- a/alc/alc.cpp
+++ b/alc/alc.cpp
@@ -2095,7 +2095,10 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const int *attrList)
case DevFmtX71:
if(GetConfigValueBool(device->DeviceName.c_str(), nullptr, "front-stablizer", 0))
{
- auto stablizer = std::make_unique<FrontStablizer>();
+ auto stablizer = FrontStablizer::Create(device->channelsFromFmt());
+ for(auto &buf : stablizer->DelayBuf)
+ std::fill(buf.begin(), buf.end(), 0.0f);
+
/* Initialize band-splitting filter for the mid signal, with a
* crossover at 5khz (could be higher).
*/