remove existing attempts at optimizing MIDI event reading, to try to fix bugs that may be connected with it

git-svn-id: svn://localhost/ardour2/branches/3.0@5667 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2009-09-16 17:53:04 +00:00
parent fa4e858eb3
commit 5cc5fb8de4
2 changed files with 4 additions and 4 deletions

View file

@ -138,13 +138,13 @@ MidiSource::midi_read (MidiRingBuffer<nframes_t>& dst, sframes_t source_start,
Evoral::Sequence<double>::const_iterator& i = _model_iter; Evoral::Sequence<double>::const_iterator& i = _model_iter;
if (_last_read_end == 0 || start != _last_read_end || !i.valid()) { // if (_last_read_end == 0 || start != _last_read_end || !i.valid()) {
for (i = _model->begin(); i != _model->end(); ++i) { for (i = _model->begin(); i != _model->end(); ++i) {
if (BEATS_TO_FRAMES(i->time()) >= start) { if (BEATS_TO_FRAMES(i->time()) >= start) {
break; break;
} }
} }
} // }
_last_read_end = start + cnt; _last_read_end = start + cnt;

View file

@ -118,7 +118,7 @@ SMFSource::read_unlocked (MidiRingBuffer<nframes_t>& destination, sframes_t sour
const uint64_t start_ticks = (uint64_t)(converter.from(start) * ppqn()); const uint64_t start_ticks = (uint64_t)(converter.from(start) * ppqn());
if (_smf_last_read_end == 0 || start != _smf_last_read_end) { // if (_smf_last_read_end == 0 || start != _smf_last_read_end) {
//cerr << "SMFSource::read_unlocked seeking to " << start << endl; //cerr << "SMFSource::read_unlocked seeking to " << start << endl;
Evoral::SMF::seek_to_start(); Evoral::SMF::seek_to_start();
while (time < start_ticks) { while (time < start_ticks) {
@ -129,7 +129,7 @@ SMFSource::read_unlocked (MidiRingBuffer<nframes_t>& destination, sframes_t sour
} }
time += ev_delta_t; // accumulate delta time time += ev_delta_t; // accumulate delta time
} }
} // }
_smf_last_read_end = start + duration; _smf_last_read_end = start + duration;