mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-18 04:36:30 +01:00
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:
parent
fa4e858eb3
commit
5cc5fb8de4
2 changed files with 4 additions and 4 deletions
|
|
@ -138,13 +138,13 @@ MidiSource::midi_read (MidiRingBuffer<nframes_t>& dst, sframes_t source_start,
|
|||
|
||||
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) {
|
||||
if (BEATS_TO_FRAMES(i->time()) >= start) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
_last_read_end = start + cnt;
|
||||
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
||||
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;
|
||||
Evoral::SMF::seek_to_start();
|
||||
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
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
_smf_last_read_end = start + duration;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue