1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

MIDI-CI: Simplify profile enablement API, and ensure that group/block member channels are always 0

This commit is contained in:
reuk 2024-01-02 15:39:59 +00:00
parent fac6f4cb20
commit 1506bb3454
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C
8 changed files with 103 additions and 55 deletions

View file

@ -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;
}