summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2015-06-13 03:58:57 +1000
committerDamien Zammit <damien@zamaudio.com>2015-06-13 03:58:57 +1000
commit66dc6a5957aa76b8aeda2a25973fcd895c8a1193 (patch)
tree6464cfb936d35205fbf38ebeaa74a9caa1814ea1
parent97b58556b2dfe3d5f2fe1e15ec44bc2cd2233155 (diff)
Fixed attack release swapped in gate
Signed-off-by: Damien Zammit <damien@zamaudio.com>
-rw-r--r--plugins/ZamGate/ZamGatePlugin.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/ZamGate/ZamGatePlugin.cpp b/plugins/ZamGate/ZamGatePlugin.cpp
index 377c2c0..f269e42 100644
--- a/plugins/ZamGate/ZamGatePlugin.cpp
+++ b/plugins/ZamGate/ZamGatePlugin.cpp
@@ -237,17 +237,17 @@ void ZamGatePlugin::d_run(const float** inputs, float** outputs, uint32_t frames
absampler = averageabs(samplesr);
absample = std::max(absamplel, absampler);
if (absample < from_dB(thresdb)) {
- gr -= att;
+ gr -= rel;
if (gr < 0.f)
gr = 0.f;
- gl -= att;
+ gl -= rel;
if (gl < 0.f)
gl = 0.f;
} else {
- gr += rel;
+ gr += att;
if (gr > 1.f)
gr = 1.f;
- gl += rel;
+ gl += att;
if (gl > 1.f)
gl = 1.f;
}