summaryrefslogtreecommitdiff
path: root/libs/ardour/session_midi.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-06-12 16:11:33 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-06-12 16:11:33 +0000
commitf1fc47b0770ec7c1e6bd6de125dbe6627c567028 (patch)
tree02cf4a7b2f67ce7801e342712aab8cfa3a2cb936 /libs/ardour/session_midi.cc
parentfddb3778120e25b3b8e8134084e260dac07c1365 (diff)
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
Diffstat (limited to 'libs/ardour/session_midi.cc')
-rw-r--r--libs/ardour/session_midi.cc9
1 files changed, 3 insertions, 6 deletions
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;
}
}