BogaudioModules

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

commit 112005dae5500b1478efc5a7204478be024c3dbc
parent 54a73ce00633079d40db4841ae1a1ea382da1a2c
Author: Matt Demanett <matt@demanett.net>
Date:   Sun, 12 Mar 2023 16:39:34 -0400

S&H: fix poly channels calculation; should always be at least 1. #224

Diffstat:
Msrc/SampleHold.cpp | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/SampleHold.cpp b/src/SampleHold.cpp @@ -99,7 +99,7 @@ int SampleHold::sectionChannels( Input* altTriggerInput, Input& in ) { - int n = 1; + int n = 0; if (_polyInputID == IN1_INPUT) { n = in.getChannels(); } @@ -108,7 +108,7 @@ int SampleHold::sectionChannels( } else if (altTriggerInput) { n = altTriggerInput->getChannels(); } - return n; + return std::max(1, n); } void SampleHold::modulateSection(