diff options
author | David Robillard <d@drobilla.net> | 2014-11-19 19:24:07 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-11-19 19:24:16 -0500 |
commit | a9936205b182faf1b32b06dbf312b4c9c77f4872 (patch) | |
tree | fce3d5526ddf749b82aabe3350be6b5278a31448 /libs/ardour/ardour/midi_source.h | |
parent | 4ffdc99c5fee8e8f62cddd4f815b132c06c83711 (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/ardour/midi_source.h')
-rw-r--r-- | libs/ardour/ardour/midi_source.h | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/libs/ardour/ardour/midi_source.h b/libs/ardour/ardour/midi_source.h index 07a32c5bfc..411c76eeea 100644 --- a/libs/ardour/ardour/midi_source.h +++ b/libs/ardour/ardour/midi_source.h @@ -143,11 +143,6 @@ class LIBARDOUR_API MidiSource : virtual public Source, public boost::enable_sha virtual void load_model(bool lock=true, bool force_reload=false) = 0; virtual void destroy_model() = 0; - /** This must be called with the source lock held whenever the - * source/model contents have been changed (reset iterators/cache/etc). - */ - void invalidate(); - void set_note_mode(NoteMode mode); boost::shared_ptr<MidiModel> model() { return _model; } @@ -194,11 +189,7 @@ class LIBARDOUR_API MidiSource : virtual public Source, public boost::enable_sha boost::shared_ptr<MidiModel> _model; bool _writing; - mutable Evoral::Sequence<Evoral::MusicalTime>::const_iterator _model_iter; - mutable bool _model_iter_valid; - - mutable double _length_beats; - mutable framepos_t _last_read_end; + mutable double _length_beats; /** The total duration of the current capture. */ framepos_t _capture_length; |