update OpenAL-Soft to 1.24.3.

This commit is contained in:
Sasha Szpakowski
2025-05-03 12:51:37 -03:00
parent 375c6f88cd
commit 5e4f3241ac
322 changed files with 54386 additions and 12885 deletions
+5 -6
View File
@@ -123,7 +123,7 @@ void EqualizerState::update(const ContextBase *context, const EffectSlot *slot,
{
auto &props = std::get<EqualizerProps>(*props_);
const DeviceBase *device{context->mDevice};
auto frequency = static_cast<float>(device->Frequency);
auto frequency = static_cast<float>(device->mSampleRate);
/* Calculate coefficients for the each type of filter. Note that the shelf
* and peaking filters' gain is for the centerpoint of the transition band,
@@ -169,18 +169,17 @@ void EqualizerState::update(const ContextBase *context, const EffectSlot *slot,
void EqualizerState::process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut)
{
const al::span<float> buffer{mSampleBuffer.data(), samplesToDo};
const auto buffer = al::span{mSampleBuffer}.first(samplesToDo);
auto chan = mChans.begin();
for(const auto &input : samplesIn)
{
const size_t outidx{chan->mTargetChannel};
if(outidx != InvalidChannelIndex)
if(const size_t outidx{chan->mTargetChannel}; outidx != InvalidChannelIndex)
{
const al::span<const float> inbuf{input.data(), samplesToDo};
const auto inbuf = al::span{input}.first(samplesToDo);
DualBiquad{chan->mFilter[0], chan->mFilter[1]}.process(inbuf, buffer);
DualBiquad{chan->mFilter[2], chan->mFilter[3]}.process(buffer, buffer);
MixSamples(buffer, samplesOut[outidx].data(), chan->mCurrentGain, chan->mTargetGain,
MixSamples(buffer, samplesOut[outidx], chan->mCurrentGain, chan->mTargetGain,
samplesToDo);
}
++chan;