From 112005dae5500b1478efc5a7204478be024c3dbc Mon Sep 17 00:00:00 2001 From: Matt Demanett Date: Sun, 12 Mar 2023 16:40:01 -0400 Subject: [PATCH] S&H: fix poly channels calculation; should always be at least 1. #224 --- src/SampleHold.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SampleHold.cpp b/src/SampleHold.cpp index 74e9f8b8..54b3b42b 100644 --- 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(