X-Git-Url: https://main.carlh.net/gitweb/?p=ardour.git;a=blobdiff_plain;f=libs%2Fardour%2Fmtc_slave.cc;h=102694e7ac7d9a9ab637871f2e085eede99bc400;hp=1a1c5f2becfe8a5a510b5442783b98360c1f5ea4;hb=c8c6bca6587450ff64303dbc994a4cd28d6ce7aa;hpb=6fc1f270137a06115a79c6089004174c5cab5ed7 diff --git a/libs/ardour/mtc_slave.cc b/libs/ardour/mtc_slave.cc index 1a1c5f2bec..102694e7ac 100644 --- a/libs/ardour/mtc_slave.cc +++ b/libs/ardour/mtc_slave.cc @@ -34,7 +34,7 @@ #include -#include "i18n.h" +#include "pbd/i18n.h" using namespace std; using namespace ARDOUR; @@ -213,6 +213,7 @@ MTC_Slave::reset (bool with_position) window_end = 0; transport_direction = 1; current_delta = 0; + ActiveChanged(false); } void @@ -468,6 +469,7 @@ MTC_Slave::update_mtc_time (const MIDI::byte *msg, bool was_full, framepos_t now first_mtc_timestamp = now; init_mtc_dll(mtc_frame, qtr); mtc_frame_dll = mtc_frame; + ActiveChanged (true); // emit signal } current.guard1++; current.position = mtc_frame; @@ -594,7 +596,7 @@ MTC_Slave::speed_and_position (double& speed, framepos_t& pos) read_current (&last); DEBUG_TRACE (DEBUG::MTC, string_compose ("speed&pos: timestamp %1 speed %2 initstate %3 dir %4 tpos %5 now %6 last-in %7\n", - last.timestamp, + last.timestamp, last.speed, engine_dll_initstate, transport_direction, @@ -603,8 +605,8 @@ MTC_Slave::speed_and_position (double& speed, framepos_t& pos) last_inbound_frame)); /* re-init engine DLL here when state changed (direction, first_mtc_timestamp) */ - if (last.timestamp == 0) { - engine_dll_initstate = 0; + if (last.timestamp == 0) { + engine_dll_initstate = 0; } else if (engine_dll_initstate != transport_direction && last.speed != 0) { engine_dll_initstate = transport_direction; init_engine_dll(last.position, session.engine().samples_per_cycle()); @@ -626,6 +628,7 @@ MTC_Slave::speed_and_position (double& speed, framepos_t& pos) session.request_transport_speed (0); engine_dll_initstate = 0; queue_reset (false); + ActiveChanged (false); DEBUG_TRACE (DEBUG::MTC, "MTC not seen for 2 frames - reset pending\n"); return false; }