Fix cycle-end position when not rolling

When stopped start_sample == end_sample.
This fixes accidental automation lookup,
as well as plugin time/position information.
This commit is contained in:
Robin Gareus 2019-11-14 21:50:00 +01:00
parent 32cfed6253
commit 3c446a5275
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 3 additions and 3 deletions

View File

@ -1294,7 +1294,7 @@ PluginInsert::automate_and_run (BufferSet& bufs, samplepos_t start, samplepos_t
samplecnt_t cnt = min (((samplecnt_t) ceil (next_event.when) - start), (samplecnt_t) nframes);
connect_and_run (bufs, start, start + cnt, speed, cnt, offset, true); // XXX (start + cnt) * speed
connect_and_run (bufs, start, start + cnt * speed, speed, cnt, offset, true);
nframes -= cnt;
offset += cnt;
@ -1310,7 +1310,7 @@ PluginInsert::automate_and_run (BufferSet& bufs, samplepos_t start, samplepos_t
/* cleanup anything that is left to do */
if (nframes) {
connect_and_run (bufs, start, start + nframes, speed, nframes, offset, true);
connect_and_run (bufs, start, start + nframes * speed, speed, nframes, offset, true);
}
}

View File

@ -166,7 +166,7 @@ Session::no_roll (pframes_t nframes)
{
PT_TIMING_CHECK (4);
samplepos_t end_sample = _transport_sample + nframes; // FIXME: varispeed + no_roll ??
samplepos_t end_sample = _transport_sample + floor (nframes * _transport_speed);
int ret = 0;
boost::shared_ptr<RouteList> r = routes.reader ();