summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/midi_source.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-03-01 13:33:25 -0500
committerDavid Robillard <d@drobilla.net>2015-03-05 17:30:31 -0500
commita8aae56d92699e4545b5f8a69742f9a1c75ad238 (patch)
treeae3c14f1b78fbfddf126b44e533692b137d93f28 /libs/ardour/ardour/midi_source.h
parent09f1571fc0c9dd164601cfd3d12fac31a084b9f6 (diff)
Handle edits while playing precisely.
This avoids stuck notes if active notes are edited, but without stopping all active notes in the region on any edit as before. This implementation injects note ons in places that aren't actually note starts. Depending on how percussive the instrument is, this may not be desired. In the future, an option for this would be an improvement, but there are other places where "start notes in the middle" is a reasonable option. I think that should be handled universally if we're to do it at all, so not considering it a part of this fix for now.
Diffstat (limited to 'libs/ardour/ardour/midi_source.h')
-rw-r--r--libs/ardour/ardour/midi_source.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/libs/ardour/ardour/midi_source.h b/libs/ardour/ardour/midi_source.h
index 8a0c13681d..156f3dbfa0 100644
--- a/libs/ardour/ardour/midi_source.h
+++ b/libs/ardour/ardour/midi_source.h
@@ -154,8 +154,12 @@ class LIBARDOUR_API MidiSource : virtual public Source, public boost::enable_sha
virtual void load_model(const Glib::Threads::Mutex::Lock& lock, bool force_reload=false) = 0;
virtual void destroy_model(const Glib::Threads::Mutex::Lock& lock) = 0;
- /** Reset cached information (like iterators) when things have changed. */
- void invalidate(const Glib::Threads::Mutex::Lock& lock);
+ /** Reset cached information (like iterators) when things have changed.
+ * @param lock Source lock, which must be held by caller.
+ * @param notes If non-NULL, currently active notes are added to this set.
+ */
+ void invalidate(const Glib::Threads::Mutex::Lock& lock,
+ std::set<Evoral::Sequence<Evoral::Beats>::WeakNotePtr>* notes=NULL);
void set_note_mode(const Glib::Threads::Mutex::Lock& lock, NoteMode mode);