summaryrefslogtreecommitdiff
path: root/libs/ardour/playlist.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-11-08 20:34:45 -0500
committerDavid Robillard <d@drobilla.net>2016-11-08 20:34:45 -0500
commitc61373212a87e519276d4c011994e2d37c77ee16 (patch)
tree216e0fcd47e24cd8db0511a074d2d203cb18fa5e /libs/ardour/playlist.cc
parent72297c0ca31400767177bbcb9310721c481a7dd8 (diff)
Support multiple readers for MIDI source/model
Fixes the multiple reader issue #6541 properly without resorting to a linear search kludge. All the read state has been pulled out into a MidiCursor which the caller is required to pass. The playlist keeps cursors for all the regions it is reading, any number of cursors are allowed at a time. MidiCursor should probably be made a smarter and more fool-proof object (and/or possibly merged with some of the other tracker/fixer stuff) but for now I wanted to keep it simple.
Diffstat (limited to 'libs/ardour/playlist.cc')
-rw-r--r--libs/ardour/playlist.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc
index 70744429f9..fcf24795db 100644
--- a/libs/ardour/playlist.cc
+++ b/libs/ardour/playlist.cc
@@ -765,6 +765,7 @@ Playlist::flush_notifications (bool from_undo)
notify_region_added (region);
region->PropertyChanged.connect_same_thread (region_state_changed_connections, boost::bind (&Playlist::region_changed_proxy, this, _1, boost::weak_ptr<Region> (region)));
+ region->DropReferences.connect_same_thread (region_drop_references_connections, boost::bind (&Playlist::region_going_away, this, boost::weak_ptr<Region> (region)));
return true;
}
@@ -1745,6 +1746,7 @@ Playlist::region_bounds_changed (const PropertyChange& what_changed, boost::shar
RegionWriteLock rl (this);
region_state_changed_connections.drop_connections ();
+ region_drop_references_connections.drop_connections ();
for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) {
pending_removes.insert (*i);