#include <glibmm/timer.h>
-#include "i18n.h"
+#include "pbd/i18n.h"
using namespace std;
using namespace ARDOUR;
busy_guard1 = busy_guard2 = 0;
last_mtc_fps_byte = session.get_mtc_timecode_bits ();
- quarter_frame_duration = (double(session.frames_per_timecode_frame()) / 4.0);
+ quarter_frame_duration = (double(session.samples_per_timecode_frame()) / 4.0);
mtc_timecode = session.config.get_timecode_format();
a3e_timecode = session.config.get_timecode_format();
window_end = 0;
transport_direction = 1;
current_delta = 0;
+ ActiveChanged(false);
}
void
long int mtc_off = (long) rint(7.0 * qtr);
DEBUG_TRACE (DEBUG::MTC, string_compose ("new mtc_frame: %1 | MTC-FpT: %2 A3-FpT:%3\n",
- mtc_frame, (4.0*qtr), session.frames_per_timecode_frame()));
+ mtc_frame, (4.0*qtr), session.samples_per_timecode_frame()));
switch (port->self_parser().mtc_running()) {
case MTC_Backward:
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;
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,
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());
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;
}