BogaudioModules

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

commit 1c668c8c12232ce24707ea38a04e5fc5b497a5e5
parent 2c60c8d01f924ce7466912c45679d434964d0e73
Author: Matt Demanett <matt@demanett.net>
Date:   Wed, 13 Nov 2019 22:46:43 -0500

Fix manual triggers on DADSRH(+), SHAPER(+). #81

Diffstat:
Msrc/DADSRH.cpp | 2+-
Msrc/DADSRHPlus.cpp | 2+-
Msrc/Shaper.cpp | 2+-
Msrc/ShaperPlus.cpp | 2+-
4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/DADSRH.cpp b/src/DADSRH.cpp @@ -8,7 +8,7 @@ void DADSRH::reset() { } int DADSRH::channels() { - return inputs[TRIGGER_INPUT].getChannels(); + return std::max(1, inputs[TRIGGER_INPUT].getChannels()); } void DADSRH::addEngine(int c) { diff --git a/src/DADSRHPlus.cpp b/src/DADSRHPlus.cpp @@ -8,7 +8,7 @@ void DADSRHPlus::reset() { } int DADSRHPlus::channels() { - return inputs[TRIGGER_INPUT].getChannels(); + return std::max(1, inputs[TRIGGER_INPUT].getChannels()); } void DADSRHPlus::addEngine(int c) { diff --git a/src/Shaper.cpp b/src/Shaper.cpp @@ -8,7 +8,7 @@ void Shaper::reset() { } int Shaper::channels() { - return std::max(inputs[SIGNAL_INPUT].getChannels(), inputs[TRIGGER_INPUT].getChannels()); + return std::max(1, std::max(inputs[SIGNAL_INPUT].getChannels(), inputs[TRIGGER_INPUT].getChannels())); } void Shaper::addEngine(int c) { diff --git a/src/ShaperPlus.cpp b/src/ShaperPlus.cpp @@ -8,7 +8,7 @@ void ShaperPlus::reset() { } int ShaperPlus::channels() { - return std::max(inputs[SIGNAL_INPUT].getChannels(), inputs[TRIGGER_INPUT].getChannels()); + return std::max(1, std::max(inputs[SIGNAL_INPUT].getChannels(), inputs[TRIGGER_INPUT].getChannels())); } void ShaperPlus::addEngine(int c) {