+
+ if (ptw & PostTransportLocate) {
+
+ if (get_play_loop() && !Config->get_seamless_loop()) {
+
+ DEBUG_TRACE (DEBUG::Butler, "flush loop recording fragment to disk\n");
+
+ /* this locate might be happening while we are
+ * loop recording.
+ *
+ * Non-seamless looping will require a locate (below) that
+ * will reset capture buffers and throw away data.
+ *
+ * Rather than first find all tracks and see if they
+ * have outstanding data, just do a flush anyway. It
+ * may be cheaper this way anyway, and is certainly
+ * more accurate.
+ */
+
+ bool more_disk_io_to_do = false;
+ uint32_t errors = 0;
+
+ do {
+ more_disk_io_to_do = _butler->flush_tracks_to_disk_after_locate (r, errors);
+
+ if (errors) {
+ break;
+ }
+
+ if (more_disk_io_to_do) {
+ continue;
+ }
+
+ } while (false);
+
+ }
+ }
+