From f1fc47b0770ec7c1e6bd6de125dbe6627c567028 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 12 Jun 2010 16:11:33 +0000 Subject: MTC drift patch from robin gareus, plus two related cleanups to the tracer & debug messages git-svn-id: svn://localhost/ardour2/branches/3.0@7255 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/session_midi.cc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'libs/ardour/session_midi.cc') diff --git a/libs/ardour/session_midi.cc b/libs/ardour/session_midi.cc index 6035a8a077..0a6b490b5a 100644 --- a/libs/ardour/session_midi.cc +++ b/libs/ardour/session_midi.cc @@ -810,12 +810,11 @@ Session::send_midi_time_code_for_cycle(nframes_t nframes) /* Duration of one quarter frame */ nframes_t quarter_frame_duration = ((long) _frames_per_timecode_frame) >> 2; - DEBUG_TRACE (DEBUG::MTC, string_compose ("TF %1 SF %2 NQ %3 FD %\4n", _transport_frame, outbound_mtc_timecode_frame, + DEBUG_TRACE (DEBUG::MTC, string_compose ("TF %1 SF %2 NQ %3 FD %4\n", _transport_frame, outbound_mtc_timecode_frame, next_quarter_frame_to_send, quarter_frame_duration)); - // FIXME: this should always be true - //assert((outbound_mtc_timecode_frame + (next_quarter_frame_to_send * quarter_frame_duration)) - // > _transport_frame); + assert((outbound_mtc_timecode_frame + (next_quarter_frame_to_send * quarter_frame_duration)) + >= _transport_frame); // Send quarter frames for this cycle @@ -887,8 +886,6 @@ Session::send_midi_time_code_for_cycle(nframes_t nframes) // Re-calculate timing of first quarter frame //timecode_to_sample( transmitting_timecode_time, outbound_mtc_timecode_frame, true /* use_offset */, false ); outbound_mtc_timecode_frame += 8 * quarter_frame_duration; - // Compensate for audio latency - outbound_mtc_timecode_frame += _worst_output_latency; } } -- cgit v1.2.3