diff options
author | Robin Gareus <robin@gareus.org> | 2012-10-13 23:27:43 +0000 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2012-10-13 23:27:43 +0000 |
commit | f66d3f9b132599ab0ef7466740437343d3462186 (patch) | |
tree | 80cf2a8a110fb4a15f966fbac4acbe92244d94f4 /libs/ardour/mtc_slave.cc | |
parent | 4a17dd8fb619e7c8d25843c79a662f29b90ce83c (diff) |
MTCslave - use new timecode API
git-svn-id: svn://localhost/ardour2/branches/3.0@13267 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/mtc_slave.cc')
-rw-r--r-- | libs/ardour/mtc_slave.cc | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/libs/ardour/mtc_slave.cc b/libs/ardour/mtc_slave.cc index c568cd5d6a..9e51a9ca24 100644 --- a/libs/ardour/mtc_slave.cc +++ b/libs/ardour/mtc_slave.cc @@ -281,7 +281,6 @@ MTC_Slave::update_mtc_time (const byte *msg, bool was_full, framepos_t now) */ //DEBUG_TRACE (DEBUG::MTC, string_compose ("MTC::update_mtc_time - TID:%1\n", ::pthread_self())); - Time timecode; TimecodeFormat tc_format; bool reset_tc = true; @@ -370,7 +369,12 @@ MTC_Slave::update_mtc_time (const byte *msg, bool was_full, framepos_t now) */ quarter_frame_duration = (double(session.frame_rate()) / (double) timecode.rate / 4.0); - session.timecode_to_sample (timecode, mtc_frame, true, false); // audio-frame according to Ardour's FPS + + Timecode::timecode_to_sample (timecode, mtc_frame, true, false, + double(session.frame_rate()), + session.config.get_subframes_per_frame(), + session.config.get_timecode_offset_negative(), session.config.get_timecode_offset() + ); DEBUG_TRACE (DEBUG::MTC, string_compose ("MTC at %1 TC %2 = mtc_frame %3 (from full message ? %4) tc-ratio %5\n", now, timecode, mtc_frame, was_full, speedup_due_to_tc_mismatch)); @@ -630,5 +634,10 @@ MTC_Slave::apparent_timecode_format () const std::string MTC_Slave::approximate_current_position() const { - return "88:88:88:88"; + SafeTime last; + read_current (&last); + return Timecode::timecode_format_sampletime( + last.position, + double(session.frame_rate()), + 25, false); } |