Fix loop/pre-roll
authorRobin Gareus <robin@gareus.org>
Fri, 8 Nov 2019 16:08:47 +0000 (17:08 +0100)
committerRobin Gareus <robin@gareus.org>
Fri, 8 Nov 2019 16:50:13 +0000 (17:50 +0100)
Pre-roll to fill buffers only needs to be done once when starting
to play or when locating.

Seamless looping just continues. Every processor takes the loop
position into account locally.

libs/ardour/session_transport.cc

index 5baa39a0f80ad0cc1608dfd406b3be5f64646be5..6b0d81172be3bf13b85e890180ff6710b0f355f4 100644 (file)
@@ -248,7 +248,9 @@ Session::do_locate (samplepos_t target_sample, bool with_roll, bool with_flush,
        // thread(s?) can restart.
        g_atomic_int_inc (&_seek_counter);
        _last_roll_or_reversal_location = target_sample;
-       _remaining_latency_preroll = worst_latency_preroll ();
+       if (!for_loop_end) {
+               _remaining_latency_preroll = worst_latency_preroll ();
+       }
        timecode_time(_transport_sample, transmitting_timecode_time); // XXX here?
 
        /* do "stopped" stuff if: