13
0

Fix automation lookup when rolling backwards

This commit is contained in:
Robin Gareus 2019-11-18 15:10:15 +01:00
parent 3b2b946d4e
commit 3cf888498a
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -1292,13 +1292,14 @@ PluginInsert::automate_and_run (BufferSet& bufs, samplepos_t start, samplepos_t
while (nframes) { while (nframes) {
samplecnt_t cnt = min (((samplecnt_t) ceil (next_event.when) - start), (samplecnt_t) nframes); samplecnt_t cnt = min ((samplecnt_t) ceil (fabs (next_event.when - start)), (samplecnt_t) nframes);
assert (cnt > 0);
connect_and_run (bufs, start, start + cnt * speed, speed, cnt, offset, true); connect_and_run (bufs, start, start + cnt * speed, speed, cnt, offset, true);
nframes -= cnt; nframes -= cnt;
offset += cnt; offset += cnt;
start += cnt; start += cnt * speed;
map_loop_range (start, end); map_loop_range (start, end);