diff options
author | Chris Robinson <[email protected]> | 2020-12-26 05:23:08 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-12-26 05:23:08 -0800 |
commit | 8a86ec8ac5cb9ae1f766bd33893bf2e6729b1025 (patch) | |
tree | 3b6a0463c5d9fb48e0bb87f4317d16102ae06b8b /alc/effects | |
parent | 5f233a2c24de58fde98e08ad8acb6cfe1803d716 (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/effects')
-rw-r--r-- | alc/effects/convolution.cpp | 2 | ||||
-rw-r--r-- | alc/effects/reverb.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/alc/effects/convolution.cpp b/alc/effects/convolution.cpp index bf439721..c072653d 100644 --- a/alc/effects/convolution.cpp +++ b/alc/effects/convolution.cpp @@ -247,7 +247,7 @@ void ConvolutionState::setBuffer(const ALCdevice *device, const BufferStorage *b (uint64_t{buffer->mSampleLen}*device->Frequency + (buffer->mSampleRate-1)) / buffer->mSampleRate); - const BandSplitter splitter{400.0f / static_cast<float>(device->Frequency)}; + const BandSplitter splitter{device->mXOverFreq / static_cast<float>(device->Frequency)}; for(auto &e : *mChans) e.mFilter = splitter; diff --git a/alc/effects/reverb.cpp b/alc/effects/reverb.cpp index 646ac624..2bf09bef 100644 --- a/alc/effects/reverb.cpp +++ b/alc/effects/reverb.cpp @@ -672,7 +672,7 @@ void ReverbState::deviceUpdate(const ALCdevice *device) mMixOut = &ReverbState::MixOutPlain; mOrderScales.fill(1.0f); } - mAmbiSplitter[0][0].init(400.0f / frequency); + mAmbiSplitter[0][0].init(device->mXOverFreq / frequency); std::fill(mAmbiSplitter[0].begin()+1, mAmbiSplitter[0].end(), mAmbiSplitter[0][0]); std::fill(mAmbiSplitter[1].begin(), mAmbiSplitter[1].end(), mAmbiSplitter[0][0]); } |