File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -166,14 +166,18 @@ void PercussionState::setChannel(size_t channel)
166166{
167167 outputChannel = std::clamp (channel,
168168 static_cast <size_t >(0 ),
169- GeonkickApi::numberOfChannels () - 1 );
169+ GeonkickApi::numberOfChannels () - 2 );
170170}
171171
172172void PercussionState::setMidiChannel (signed char channel)
173173{
174- outputMidiChannel = std::clamp (channel,
175- static_cast <size_t >(0 ),
176- GeonkickApi::numberOfMidiChannels () - 1 );
174+ if (GeonkickTypes::geonkickAnyMidiChannel == static_cast <int >(channel)) {
175+ outputMidiChannel = channel;
176+ } else {
177+ outputMidiChannel = std::clamp (channel,
178+ static_cast <decltype (channel)>(0 ),
179+ static_cast <decltype (channel)>(GeonkickApi::numberOfMidiChannels () - 1 ));
180+ }
177181}
178182
179183void PercussionState::setMute (bool b)
You can’t perform that action at this time.
0 commit comments