summaryrefslogtreecommitdiff
path: root/libs/ardour/mtc_slave.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-12-01 01:50:47 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-12-01 01:50:47 +0000
commit929f9a101a26ba11230a8185f72524185fe05953 (patch)
tree8481fe8f92e7df375042e0e58fdfbc006e883fad /libs/ardour/mtc_slave.cc
parent2ad2792bcbdaa66d734562c207e23cd3113591bc (diff)
continue with MTC debugging
git-svn-id: svn://localhost/ardour2/branches/3.0@6234 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/mtc_slave.cc')
-rw-r--r--libs/ardour/mtc_slave.cc13
1 files changed, 4 insertions, 9 deletions
diff --git a/libs/ardour/mtc_slave.cc b/libs/ardour/mtc_slave.cc
index a0570f42bc..609f9862c3 100644
--- a/libs/ardour/mtc_slave.cc
+++ b/libs/ardour/mtc_slave.cc
@@ -134,20 +134,14 @@ MTC_Slave::update_mtc_time (const byte *msg, bool was_full)
session.timecode_to_sample (timecode, mtc_frame, true, false);
- DEBUG_TRACE (DEBUG::MTC, string_compose ("MTC time now %1 = frame %2 (from full message ? %3)\n", timecode, mtc_frame, was_full));
+ DEBUG_TRACE (DEBUG::MTC, string_compose ("MTC time timestamp = %1 TC %2 = frame %3 (from full message ? %4)\n",
+ now, timecode, mtc_frame, was_full));
if (was_full) {
- current.guard1++;
- current.position = mtc_frame;
- current.timestamp = 0;
- current.speed = 0;
- current.guard2++;
-
session.request_locate (mtc_frame, false);
session.request_transport_speed (0);
update_mtc_status (MIDI::Parser::MTC_Stopped);
-
reset ();
} else {
@@ -197,6 +191,7 @@ MTC_Slave::update_mtc_time (const byte *msg, bool was_full)
current.timestamp = now;
current.speed = speed;
current.guard2++;
+ DEBUG_TRACE (DEBUG::MTC, string_compose ("stored TC frame = %1 @ %2, sp = %3\n", mtc_frame, now, speed));
}
last_inbound_frame = now;
@@ -263,13 +258,13 @@ void
MTC_Slave::read_current (SafeTime *st) const
{
int tries = 0;
+
do {
if (tries == 10) {
error << _("MTC Slave: atomic read of current time failed, sleeping!") << endmsg;
usleep (20);
tries = 0;
}
-
*st = current;
tries++;