summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_region.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-11-20 15:36:11 -0500
committerDavid Robillard <d@drobilla.net>2014-11-20 15:36:11 -0500
commit4bc0d1c475f4f8c87b0fea690e5105d31337d6f4 (patch)
treefe0aed2c39451cfcea385d91166bc43d82a97b74 /libs/ardour/midi_region.cc
parent8bba63282a4d641287d6da945fc7ce49b583038c (diff)
Fix lost MIDI note offs and controllers.
Fix initial read of discrete MIDI controllers. Fix spurious note offs when starting to play in the middle of a note. Faster search for initial event when cached iterator is invalid. So much for dropping the cached iterator. The iterator is responsible for handling note offs, so that doesn't work. This design means we have some stuck note issues at the source read level, but they should be taken care of by the state tracker anyway.
Diffstat (limited to 'libs/ardour/midi_region.cc')
-rw-r--r--libs/ardour/midi_region.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/ardour/midi_region.cc b/libs/ardour/midi_region.cc
index cb0d103b1e..71fd796b81 100644
--- a/libs/ardour/midi_region.cc
+++ b/libs/ardour/midi_region.cc
@@ -421,6 +421,13 @@ MidiRegion::model_automation_state_changed (Evoral::Parameter const & p)
} else {
_filtered_parameters.insert (p);
}
+
+ /* the source will have an iterator into the model, and that iterator will have been set up
+ for a given set of filtered_parameters, so now that we've changed that list we must invalidate
+ the iterator.
+ */
+ Glib::Threads::Mutex::Lock lm (midi_source(0)->mutex());
+ midi_source(0)->invalidate ();
}
/** This is called when a trim drag has resulted in a -ve _start time for this region.