+bool
+Session::maybe_sync_start (nframes_t& nframes, nframes_t& offset)
+{
+ nframes_t sync_offset;
+
+ if (!waiting_for_sync_offset) {
+ return false;
+ }
+
+ if (_engine.get_sync_offset (sync_offset) && sync_offset < nframes) {
+
+ no_roll (sync_offset, 0);
+ nframes -= sync_offset;
+ offset += sync_offset;
+ waiting_for_sync_offset = false;
+
+ if (nframes == 0) {
+ return true; // done
+ }
+
+ } else {
+ no_roll (nframes, 0);
+ return true; // done
+ }
+
+ return false;
+}
+