BogaudioModules

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

commit 4437679a9f6a18a7a2c94bc91569ec83fda76b59
parent c2a0fb7db31bcce0b579ce02ab01b08ef5ff6177
Author: Matt Demanett <matt@demanett.net>
Date:   Fri, 15 Nov 2019 16:57:26 -0500

AD, DGATE: fix for operation with no inputs (broken by poly changes). #84

Diffstat:
Msrc/AD.cpp | 2+-
Msrc/DGate.cpp | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/AD.cpp b/src/AD.cpp @@ -47,7 +47,7 @@ bool AD::active() { } int AD::channels() { - return inputs[TRIGGER_INPUT].getChannels(); + return std::max(1, inputs[TRIGGER_INPUT].getChannels()); } void AD::addEngine(int c) { diff --git a/src/DGate.cpp b/src/DGate.cpp @@ -17,7 +17,7 @@ void DGate::reset() { } int DGate::channels() { - return inputs[TRIGGER_INPUT].getChannels(); + return std::max(1, inputs[TRIGGER_INPUT].getChannels()); } void DGate::addEngine(int c) {