aboutsummaryrefslogtreecommitdiffstats
path: root/alc/alc.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-12-26 05:23:08 -0800
committerChris Robinson <[email protected]>2020-12-26 05:23:08 -0800
commit8a86ec8ac5cb9ae1f766bd33893bf2e6729b1025 (patch)
tree3b6a0463c5d9fb48e0bb87f4317d16102ae06b8b /alc/alc.cpp
parent5f233a2c24de58fde98e08ad8acb6cfe1803d716 (diff)
Add a crossover frequency field for the device
Used when upsampling low-order ambisonic signals to higher order. Rather than a hardcoded 400hz, it ensures a consistent crossover point when an ambdec configuration is used. It can also allow for an alsoft config option.
Diffstat (limited to 'alc/alc.cpp')
-rw-r--r--alc/alc.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp
index d42d055b..b833cb80 100644
--- a/alc/alc.cpp
+++ b/alc/alc.cpp
@@ -2219,7 +2219,8 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const int *attrList)
AmbiIndex::OrderFrom2DChannel.data() :
AmbiIndex::OrderFromChannel.data()};
- const BandSplitter splitter{400.0f / static_cast<float>(device->Frequency)};
+ const BandSplitter splitter{device->mXOverFreq /
+ static_cast<float>(device->Frequency)};
const auto scales = BFormatDec::GetHFOrderScales(voice->mAmbiOrder,
device->mAmbiOrder);