summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_model.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-11-19 19:24:07 -0500
committerDavid Robillard <d@drobilla.net>2014-11-19 19:24:16 -0500
commita9936205b182faf1b32b06dbf312b4c9c77f4872 (patch)
treefce3d5526ddf749b82aabe3350be6b5278a31448 /libs/ardour/midi_model.cc
parent4ffdc99c5fee8e8f62cddd4f815b132c06c83711 (diff)
Fix dropped MIDI events, especially with record enabled.
I am not precisely sure why the cached iterator was causing this problem, it shouldn't be invalidated, and the times make sense. It may be some lock related issue since the iterator holds a lock on the source. In any case, this cached iterator was just to avoid repeated linear search of the model, but since the model has a logarithmic search, instead just scrap all this problematic persistent state and search for the appropriate start time every read. No need to be careful about invalidating when anything changes.
Diffstat (limited to 'libs/ardour/midi_model.cc')
-rw-r--r--libs/ardour/midi_model.cc5
1 files changed, 0 insertions, 5 deletions
diff --git a/libs/ardour/midi_model.cc b/libs/ardour/midi_model.cc
index 259a04bc0f..8e17e1d3ec 100644
--- a/libs/ardour/midi_model.cc
+++ b/libs/ardour/midi_model.cc
@@ -1630,7 +1630,6 @@ MidiModel::edit_lock()
assert (ms);
Glib::Threads::Mutex::Lock* source_lock = new Glib::Threads::Mutex::Lock (ms->mutex());
- ms->invalidate(); // Release cached iterator's read lock on model
return WriteLock(new WriteLockImpl(source_lock, _lock, _control_lock));
}
@@ -1854,10 +1853,6 @@ MidiModel::set_midi_source (boost::shared_ptr<MidiSource> s)
{
boost::shared_ptr<MidiSource> old = _midi_source.lock ();
- if (old) {
- old->invalidate ();
- }
-
_midi_source_connections.drop_connections ();
_midi_source = s;