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
DiskReader::realtime_locate (bool for_loop_end)
{
if (!for_loop_end) {
+ std::cerr << name() << "DO note resolve on locate for loop\n";
boost::shared_ptr<MidiTrack> mt = boost::dynamic_pointer_cast<MidiTrack>(_track);
_tracker.resolve_notes (mt->immediate_events(), 0);
+ } else {
+ std::cerr << name() << "skip note resolve on locate for loop\n";
}
}
return;
}
+ PBD::stacktrace (std::cerr, 20);
+
for (int channel = 0; channel < 16; ++channel) {
for (int note = 0; note < 128; ++note) {
while (_active_notes[note + 128 * channel]) {
}
void
-Plugin::realtime_locate (bool)
+Plugin::realtime_locate (bool for_loop_end)
{
- resolve_midi ();
+ std::cerr << name() << " RL fle = " << for_loop_end << std::endl;
+
+ //if (!for_loop_end) {
+ resolve_midi ();
+//}
}
void
#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)) {
TransportFSM::locate_for_loop (Event const & l)
{
assert (l.type == Locate);
- DEBUG_TRACE (DEBUG::TFSMEvents, "locate_for_loop\n");
+ DEBUG_TRACE (DEBUG::TFSMEvents, string_compose ("locate_for_loop, wl = %1\n", l.with_loop));
current_roll_after_locate_status = l.with_roll;
api->locate (l.target, l.with_roll, l.with_flush, l.with_loop, l.force);
}