Fix stuck notes on save during MIDI playback.
authorDavid Robillard <d@drobilla.net>
Wed, 13 May 2015 00:10:23 +0000 (20:10 -0400)
committerDavid Robillard <d@drobilla.net>
Wed, 13 May 2015 00:10:23 +0000 (20:10 -0400)
libs/ardour/midi_model.cc

index de5000669c46f84e287f83cdd8f6e165a40354af..3d53abaae5db6808a02d7de994facfcbfb95f7b1 100644 (file)
@@ -1453,6 +1453,11 @@ MidiModel::sync_to_source (const Glib::Threads::Mutex::Lock& source_lock)
                return false;
        }
 
+       /* Invalidate and store active notes, which will be picked up by the iterator
+          on the next roll if time progresses linearly. */
+       ms->invalidate(source_lock,
+                      ms->session().transport_rolling() ? &_active_notes : NULL);
+
        ms->mark_streaming_midi_write_started (source_lock, note_mode());
 
        for (Evoral::Sequence<TimeType>::const_iterator i = begin(TimeType(), true); i != end(); ++i) {