aboutsummaryrefslogtreecommitdiffstats
path: root/alc/effects/convolution.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-09-18 10:12:58 -0700
committerChris Robinson <[email protected]>2020-09-18 10:12:58 -0700
commit8ef242bce084fae0689f2148442d10b5d029a512 (patch)
treeb313ef4c26851eea9d9e98a6daee64b1dea88355 /alc/effects/convolution.cpp
parent07989a34dc547ec3ba30468c9d094762709a7adc (diff)
Don't use direct channels with convolution
It may come back as an effect property, but it's probably better to not try forcing it by default.
Diffstat (limited to 'alc/effects/convolution.cpp')
-rw-r--r--alc/effects/convolution.cpp24
1 files changed, 5 insertions, 19 deletions
diff --git a/alc/effects/convolution.cpp b/alc/effects/convolution.cpp
index eda5e838..8f1f2c5d 100644
--- a/alc/effects/convolution.cpp
+++ b/alc/effects/convolution.cpp
@@ -342,26 +342,12 @@ void ConvolutionState::update(const ALCcontext *context, const ALeffectslot *slo
}
else if(mChannels == FmtStereo)
{
- /* TODO: Add a "direct channels" setting for this effect? */
- const ALuint lidx{!target.RealOut ? INVALID_CHANNEL_INDEX :
- GetChannelIdxByName(*target.RealOut, FrontLeft)};
- const ALuint ridx{!target.RealOut ? INVALID_CHANNEL_INDEX :
- GetChannelIdxByName(*target.RealOut, FrontRight)};
- if(lidx != INVALID_CHANNEL_INDEX && ridx != INVALID_CHANNEL_INDEX)
- {
- mOutTarget = target.RealOut->Buffer;
- chans[0].Target[lidx] = gain;
- chans[1].Target[ridx] = gain;
- }
- else
- {
- const auto lcoeffs = CalcDirectionCoeffs({-1.0f, 0.0f, 0.0f}, 0.0f);
- const auto rcoeffs = CalcDirectionCoeffs({ 1.0f, 0.0f, 0.0f}, 0.0f);
+ const auto lcoeffs = CalcDirectionCoeffs({-1.0f, 0.0f, 0.0f}, 0.0f);
+ const auto rcoeffs = CalcDirectionCoeffs({ 1.0f, 0.0f, 0.0f}, 0.0f);
- mOutTarget = target.Main->Buffer;
- ComputePanGains(target.Main, lcoeffs.data(), gain, chans[0].Target);
- ComputePanGains(target.Main, rcoeffs.data(), gain, chans[1].Target);
- }
+ mOutTarget = target.Main->Buffer;
+ ComputePanGains(target.Main, lcoeffs.data(), gain, chans[0].Target);
+ ComputePanGains(target.Main, rcoeffs.data(), gain, chans[1].Target);
}
else if(mChannels == FmtMono)
{