Adapt the array size to account for possibly extended CCs
This commit is contained in:
parent
38ab855415
commit
81cd4db0c4
2 changed files with 3 additions and 3 deletions
|
|
@ -258,13 +258,13 @@ bool sfz::Synth::loadSfzFile(const fs::path& filename)
|
||||||
noteActivationLists[note].push_back(region);
|
noteActivationLists[note].push_back(region);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto cc = 0; cc < 128; cc++) {
|
for (auto cc = 0; cc < config::numCCs; cc++) {
|
||||||
if (region->ccTriggers.contains(cc) || region->ccConditions.contains(cc))
|
if (region->ccTriggers.contains(cc) || region->ccConditions.contains(cc))
|
||||||
ccActivationLists[cc].push_back(region);
|
ccActivationLists[cc].push_back(region);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Defaults
|
// Defaults
|
||||||
for (int ccIndex = 1; ccIndex < 128; ccIndex++) {
|
for (int ccIndex = 0; ccIndex < config::numCCs; ccIndex++) {
|
||||||
const auto channel = region->channelRange.getStart();
|
const auto channel = region->channelRange.getStart();
|
||||||
region->registerCC(channel, ccIndex, midiState.getCCValue(channel, ccIndex));
|
region->registerCC(channel, ccIndex, midiState.getCCValue(channel, ccIndex));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -422,7 +422,7 @@ private:
|
||||||
// occur in the audio callback
|
// occur in the audio callback
|
||||||
VoicePtrVector voiceViewArray;
|
VoicePtrVector voiceViewArray;
|
||||||
std::array<RegionPtrVector, 128> noteActivationLists;
|
std::array<RegionPtrVector, 128> noteActivationLists;
|
||||||
std::array<RegionPtrVector, 128> ccActivationLists;
|
std::array<RegionPtrVector, config::numCCs> ccActivationLists;
|
||||||
|
|
||||||
// Internal temporary buffer
|
// Internal temporary buffer
|
||||||
AudioBuffer<float> tempBuffer { 2, config::defaultSamplesPerBlock };
|
AudioBuffer<float> tempBuffer { 2, config::defaultSamplesPerBlock };
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue