Correct the self-masking behavior
This commit is contained in:
parent
8251160633
commit
498e1b95bb
1 changed files with 8 additions and 8 deletions
|
|
@ -884,6 +884,14 @@ void sfz::Synth::noteOnDispatch(int delay, int noteNumber, float velocity) noexc
|
||||||
noteOffDispatch(delay, voice->getTriggerNumber(), voice->getTriggerValue());
|
noteOffDispatch(delay, voice->getTriggerNumber(), voice->getTriggerValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Polyphony reached on note_polyphony
|
||||||
|
if (region->notePolyphony && notePolyphonyCounter >= *region->notePolyphony) {
|
||||||
|
if (selfMaskCandidate != nullptr)
|
||||||
|
selfMaskCandidate->release(delay);
|
||||||
|
else // We're the lowest velocity guy here
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
auto parent = region->parent;
|
auto parent = region->parent;
|
||||||
|
|
||||||
// Polyphony reached on region
|
// Polyphony reached on region
|
||||||
|
|
@ -910,14 +918,6 @@ void sfz::Synth::noteOnDispatch(int delay, int noteNumber, float velocity) noexc
|
||||||
parent = parent->getParent();
|
parent = parent->getParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Polyphony reached on note_polyphony
|
|
||||||
if (region->notePolyphony && notePolyphonyCounter >= *region->notePolyphony) {
|
|
||||||
if (selfMaskCandidate == nullptr)
|
|
||||||
continue; // We're the lowest velocity guy here
|
|
||||||
selectedVoice = selfMaskCandidate;
|
|
||||||
goto render;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Engine polyphony reached, we're stealing something
|
// Engine polyphony reached, we're stealing something
|
||||||
if (selectedVoice == nullptr) {
|
if (selectedVoice == nullptr) {
|
||||||
selectedVoice = stealer.steal(absl::MakeSpan(voiceViewArray));
|
selectedVoice = stealer.steal(absl::MakeSpan(voiceViewArray));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue