From c4a88de11f5a4c08418523a1f0fd0634b2f56857 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 20 Sep 2007 03:33:33 +0000 Subject: Fix serialization of node polyphonic value. Fix loading of patches with more than one node (whoops...). git-svn-id: http://svn.drobilla.net/lad/ingen@738 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/MidiNoteNode.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/libs/engine/MidiNoteNode.cpp') 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; -- cgit v1.2.1