BogaudioModules

BogaudioModules for VCV Rack
Log | Files | Refs | README | LICENSE

commit 6144bdae25924d09cda400789d1138ee306e555a
parent 5e3f7c71d7245c454175f00008b817dd173bdaa9
Author: Matt Demanett <matt@demanett.net>
Date:   Thu, 21 Nov 2019 21:20:11 -0500

Remove some unneeded checks.

Diffstat:
Msrc/Nsgt.cpp | 8--------
Msrc/Pressor.cpp | 8--------
2 files changed, 0 insertions(+), 16 deletions(-)

diff --git a/src/Nsgt.cpp b/src/Nsgt.cpp @@ -40,10 +40,6 @@ void Nsgt::modulate() { void Nsgt::modulateChannel(int c) { Engine& e = *_engines[c]; - if (!_engines[c]) { - return; - } - e.thresholdDb = params[THRESHOLD_PARAM].getValue(); if (inputs[THRESHOLD_INPUT].isConnected()) { e.thresholdDb *= clamp(inputs[THRESHOLD_INPUT].getPolyVoltage(c) / 10.0f, 0.0f, 1.0f); @@ -70,10 +66,6 @@ void Nsgt::modulateChannel(int c) { void Nsgt::processChannel(const ProcessArgs& args, int c) { Engine& e = *_engines[c]; - if (!_engines[c]) { - return; - } - float leftInput = inputs[LEFT_INPUT].getPolyVoltage(c); float rightInput = inputs[RIGHT_INPUT].getPolyVoltage(c); float env = e.detector.next(leftInput + rightInput); diff --git a/src/Pressor.cpp b/src/Pressor.cpp @@ -45,10 +45,6 @@ void Pressor::modulate() { void Pressor::modulateChannel(int c) { Engine& e = *_engines[c]; - if (!_engines[c]) { - return; - } - e.thresholdDb = params[THRESHOLD_PARAM].getValue(); if (inputs[THRESHOLD_INPUT].isConnected()) { e.thresholdDb *= clamp(inputs[THRESHOLD_INPUT].getPolyVoltage(c) / 10.0f, 0.0f, 1.0f); @@ -112,10 +108,6 @@ void Pressor::modulateChannel(int c) { void Pressor::processChannel(const ProcessArgs& args, int c) { Engine& e = *_engines[c]; - if (!_engines[c]) { - return; - } - float leftInput = inputs[LEFT_INPUT].getPolyVoltage(c) * e.inLevel; float rightInput = inputs[RIGHT_INPUT].getPolyVoltage(c) * e.inLevel; float env = leftInput + rightInput;