summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBe <be@mixxx.org>2018-05-20 14:53:24 -0500
committerBe <be@mixxx.org>2018-05-29 10:27:59 -0500
commit2b72491ee2a0bd761e0d68600b62ebbb3b89dc6c (patch)
tree0b36e6a327d35622b2a81dff48871bbf79cf3a9f /lib
parent4a073e979eff5b7b2753cf6f2645072f0930d271 (diff)
pass EffectChainInsertionType to effects
so Echo and Reverb do not add the dry signal to their output in "Send" mode
Diffstat (limited to 'lib')
-rw-r--r--lib/reverb/Reverb.cc6
-rw-r--r--lib/reverb/Reverb.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/reverb/Reverb.cc b/lib/reverb/Reverb.cc
index e9d5ddbba6..e2c0714246 100644
--- a/lib/reverb/Reverb.cc
+++ b/lib/reverb/Reverb.cc
@@ -434,7 +434,7 @@ Descriptor<PlateX2>::setup()
// (timrae) we have our left / right samples interleaved in the same array, so use slightly modified version of PlateX2::cycle
void MixxxPlateX2::processBuffer(const sample_t* in, sample_t* out, const uint frames, const sample_t bandwidthParam,
- const sample_t decayParam, const sample_t dampingParam, const sample_t blendParam) {
+ const sample_t decayParam, const sample_t dampingParam, const sample_t blendParam, bool addDry) {
// set bandwidth
input.bandwidth.set(exp(-M_PI * (1. - (.005 + .994*bandwidthParam))));
// set decay
@@ -454,7 +454,7 @@ void MixxxPlateX2::processBuffer(const sample_t* in, sample_t* out, const uint f
sample_t mono_sample = blend * (in[i] + in[i + 1]) / 2;
sample_t xl, xr;
PlateStub::process(mono_sample, decay, &xl, &xr);
- out[i] = xl + in[i];
- out[i + 1] = xr + in[i + 1];
+ out[i] = xl + (addDry ? in[i] : 0);
+ out[i + 1] = xr + (addDry ? in[i + 1] : 0);
}
}
diff --git a/lib/reverb/Reverb.h b/lib/reverb/Reverb.h
index ae9591905f..8f50ea0c09 100644
--- a/lib/reverb/Reverb.h
+++ b/lib/reverb/Reverb.h
@@ -224,7 +224,7 @@ class PlateX2
class MixxxPlateX2 : public PlateStub {
public:
void processBuffer(const sample_t* in, sample_t* out, const uint frames, const sample_t bandwidthParam,
- const sample_t decayParam, const sample_t dampingParam, const sample_t blendParam);
+ const sample_t decayParam, const sample_t dampingParam, const sample_t blendParam, bool addDry);
void init(float sampleRate) {
fs = sampleRate;