From 3fe38fed7c29869a43b42d634417452b1a5fedbc Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 23 Dec 2018 08:51:28 -0800 Subject: Mix effect slot output to the effect target if it's set --- Alc/effects/fshifter.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'Alc/effects/fshifter.cpp') diff --git a/Alc/effects/fshifter.cpp b/Alc/effects/fshifter.cpp index 9b6d700c..e8311620 100644 --- a/Alc/effects/fshifter.cpp +++ b/Alc/effects/fshifter.cpp @@ -132,7 +132,18 @@ void ALfshifterState::update(const ALCcontext *context, const ALeffectslot *slot ALfloat coeffs[MAX_AMBI_COEFFS]; CalcAngleCoeffs(0.0f, 0.0f, 0.0f, coeffs); - ComputePanGains(&device->Dry, coeffs, slot->Params.Gain, mTargetGains); + if(ALeffectslot *target{slot->Params.Target}) + { + mOutBuffer = target->WetBuffer; + mOutChannels = target->NumChannels; + ComputePanGains(target, coeffs, slot->Params.Gain, mTargetGains); + } + else + { + mOutBuffer = device->Dry.Buffer; + mOutChannels = device->Dry.NumChannels; + ComputePanGains(&device->Dry, coeffs, slot->Params.Gain, mTargetGains); + } } void ALfshifterState::process(ALsizei SamplesToDo, const ALfloat (*RESTRICT SamplesIn)[BUFFERSIZE], ALfloat (*RESTRICT SamplesOut)[BUFFERSIZE], ALsizei NumChannels) -- cgit v1.2.3