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.
This commit is contained in:
David Robillard 2014-11-19 19:24:07 -05:00
parent 4ffdc99c5f
commit a9936205b1
5 changed files with 9 additions and 60 deletions

View file

@ -702,8 +702,6 @@ SMFSource::load_model (bool lock, bool force_reload)
_model->end_write (Evoral::Sequence<Evoral::MusicalTime>::ResolveStuckNotes, _length_beats);
_model->set_edited (false);
_model_iter = _model->begin();
free(buf);
}