Skip to content

Commit

Permalink
S&H: fix poly channels calculation; should always be at least 1. #224
Browse files Browse the repository at this point in the history
  • Loading branch information
mdemanett committed Mar 12, 2023
1 parent 54a73ce commit 112005d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SampleHold.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ int SampleHold::sectionChannels(
Input* altTriggerInput,
Input& in
) {
int n = 1;
int n = 0;
if (_polyInputID == IN1_INPUT) {
n = in.getChannels();
}
Expand All @@ -108,7 +108,7 @@ int SampleHold::sectionChannels(
} else if (altTriggerInput) {
n = altTriggerInput->getChannels();
}
return n;
return std::max(1, n);
}

void SampleHold::modulateSection(
Expand Down

0 comments on commit 112005d

Please sign in to comment.