13
0

Fix looping automation - see also 6a55146f

This commit is contained in:
Robin Gareus 2022-10-26 21:03:08 +02:00
parent bc5d21b235
commit 489c9ace9f
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -1379,6 +1379,7 @@ PluginInsert::automate_and_run (BufferSet& bufs, samplepos_t start, samplepos_t
while (nframes) {
samplecnt_t cnt = min (timepos_t (start).distance (next_event.when).samples(), (samplecnt_t) nframes);
assert (cnt > 0);
connect_and_run (bufs, start, start + cnt * speed, speed, cnt, offset, true);
@ -1389,7 +1390,7 @@ PluginInsert::automate_and_run (BufferSet& bufs, samplepos_t start, samplepos_t
map_loop_range (start, end);
if (!find_next_event (next_event.when, timepos_t (end), next_event)) {
if (!find_next_event (std::min (timepos_t (start), next_event.when), timepos_t (end), next_event)) {
break;
}
}