diff options
Diffstat (limited to 'src/libs/engine')
-rw-r--r-- | src/libs/engine/MidiNoteNode.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/libs/engine/MidiNoteNode.cpp b/src/libs/engine/MidiNoteNode.cpp index 03dc01b3..fac654f0 100644 --- a/src/libs/engine/MidiNoteNode.cpp +++ b/src/libs/engine/MidiNoteNode.cpp @@ -94,9 +94,13 @@ MidiNoteNode::apply_poly(Raul::Maid& maid, uint32_t poly) { NodeBase::apply_poly(maid, poly); - maid.push(_voices); - _voices = _prepared_voices; - _prepared_voices = NULL; + if (_prepared_voices) { + assert(poly <= _prepared_poly); + maid.push(_voices); + _voices = _prepared_voices; + _prepared_voices = NULL; + } + _polyphony = poly; return true; |