summaryrefslogtreecommitdiff
path: root/libs/ardour/rt_midibuffer.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2019-11-06 22:12:40 -0700
committerPaul Davis <paul@linuxaudiosystems.com>2019-11-06 22:12:40 -0700
commit625b8297ea59232a1d91f9bf2efeb65ca70b9791 (patch)
tree1a7c06502d85374fa0aa578f857dea21d8a49d5b /libs/ardour/rt_midibuffer.cc
parenteda27cc3de7dda78aaf24edf0ba7e75e7a9df8b9 (diff)
fix unconditional note resolution during DiskReader::realtime_locate()
When looping, we do not want to resolve notes at the end of the loop via ::realtime_locate() - ::get_midi_playback() has already taken care of this. But when not looping, we need this. So, add an argument to tell all interested parties whether the locate is for a loop end or not
Diffstat (limited to 'libs/ardour/rt_midibuffer.cc')
-rw-r--r--libs/ardour/rt_midibuffer.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/ardour/rt_midibuffer.cc b/libs/ardour/rt_midibuffer.cc
index 3a60c9e93f..c67e81c1ae 100644
--- a/libs/ardour/rt_midibuffer.cc
+++ b/libs/ardour/rt_midibuffer.cc
@@ -180,9 +180,10 @@ RTMidiBuffer::read (MidiBuffer& dst, samplepos_t start, samplepos_t end, MidiSta
#ifndef NDEBUG
TimeType unadjusted_time;
+ Item* last = iend; --last;
#endif
- DEBUG_TRACE (DEBUG::MidiRingBuffer, string_compose ("read from %1 .. %2 .. initial index = %3 (time = %4) (range in list of %7 %5..%6)\n", start, end, item - _data, item->timestamp, _data->timestamp, iend->timestamp, _size));
+ DEBUG_TRACE (DEBUG::MidiRingBuffer, string_compose ("read from %1 .. %2 .. initial index = %3 (time = %4) (range in list of %7 %5..%6)\n", start, end, item - _data, item->timestamp, _data->timestamp, last->timestamp, _size));
while ((item < iend) && (item->timestamp < end)) {