mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
MIDI-CI: Simplify profile enablement API, and ensure that group/block member channels are always 0
This commit is contained in:
parent
fac6f4cb20
commit
1506bb3454
8 changed files with 103 additions and 55 deletions
|
|
@ -4088,10 +4088,7 @@ private:
|
|||
else
|
||||
h->addProfile (profileAtAddress, state.supported);
|
||||
|
||||
if (state.active == 0)
|
||||
h->disableProfile (profileAtAddress);
|
||||
else
|
||||
h->enableProfile (profileAtAddress, state.active);
|
||||
h->setProfileEnablement (profileAtAddress, state.active);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4589,12 +4586,9 @@ private:
|
|||
|
||||
if (auto* host = demo.getProfileHost())
|
||||
{
|
||||
if (enabled)
|
||||
host->enableProfile (profileAtAddress, numChannels);
|
||||
else
|
||||
host->disableProfile (profileAtAddress);
|
||||
|
||||
profiles.channels[profileAtAddress].active = (uint16_t) numChannels;
|
||||
const auto count = enabled ? jmax (1, numChannels) : 0;
|
||||
host->setProfileEnablement (profileAtAddress, count);
|
||||
profiles.channels[profileAtAddress].active = (uint16_t) count;
|
||||
|
||||
state = profiles;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue