Added a switched on check for CC events in the regions
This commit is contained in:
parent
0147546f6a
commit
18cc80f344
1 changed files with 4 additions and 2 deletions
|
|
@ -539,12 +539,14 @@ bool sfz::Region::registerCC(int channel, int ccNumber, uint8_t ccValue) noexcep
|
||||||
if (!channelRange.containsWithEnd(channel))
|
if (!channelRange.containsWithEnd(channel))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// TODO: we can probably
|
|
||||||
if (ccConditions.getWithDefault(ccNumber).containsWithEnd(ccValue))
|
if (ccConditions.getWithDefault(ccNumber).containsWithEnd(ccValue))
|
||||||
ccSwitched.set(ccNumber, true);
|
ccSwitched.set(ccNumber, true);
|
||||||
else
|
else
|
||||||
ccSwitched.set(ccNumber, false);
|
ccSwitched.set(ccNumber, false);
|
||||||
|
|
||||||
|
if (!isSwitchedOn())
|
||||||
|
return false;
|
||||||
|
|
||||||
if (ccTriggers.contains(ccNumber) && ccTriggers.at(ccNumber).containsWithEnd(ccValue))
|
if (ccTriggers.contains(ccNumber) && ccTriggers.at(ccNumber).containsWithEnd(ccValue))
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue