- transport_frame));
-
-
-
- if (change & transport_rolling) {
-
- /* transport-change (started rolling) */
-
- if (_alignment_style == ExistingMaterial) {
-
- /* audio played by ardour will take (up to) _session.worst_output_latency() ("WOL") to
- appear at the speakers; audio played at the time when it does appear at
- the speakers will take _capture_offset to arrive back here. we've
- already added _capture_offset, so now add WOL.
- */
-
- first_recordable_frame += _session.worst_output_latency();
- DEBUG_TRACE (DEBUG::CaptureAlignment, string_compose ("\tROLL: shift FRF by delta between WOL %1\n",
- first_recordable_frame));
- } else {
- first_recordable_frame += _roll_delay;
- DEBUG_TRACE (DEBUG::CaptureAlignment, string_compose ("\tROLL: shift FRF by roll delay of %1 to %2\n",
- _roll_delay, first_recordable_frame));
- }
-
- } else {
-
- /* punch in */
-
- if (_alignment_style == ExistingMaterial) {
-
- /* see comment in ExistingMaterial block above */
- first_recordable_frame += _session.worst_output_latency();
- DEBUG_TRACE (DEBUG::CaptureAlignment, string_compose ("\tMANUAL PUNCH: shift FRF by delta between WOL and CO to %1\n",
- first_recordable_frame));
- } else {
- capture_start_frame -= _roll_delay;
- DEBUG_TRACE (DEBUG::CaptureAlignment, string_compose ("\tPUNCH: shift CSF by roll delay of %1 to %2\n",
- _roll_delay, capture_start_frame));
- }
+ _session.worst_track_latency()));
+
+
+ if (_alignment_style == ExistingMaterial) {
+ first_recordable_frame += existing_material_offset;
+ DEBUG_TRACE (DEBUG::CaptureAlignment, string_compose ("\tshift FRF by EMO %1\n",
+ first_recordable_frame));