summaryrefslogtreecommitdiff
path: root/libs/ardour/mtc_slave.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-05-12 12:17:17 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2015-06-29 14:18:12 -0400
commit16dccfcb8af5eb3c5462ee6a7b3a00596fb8164e (patch)
tree32283e1eece72d69660f174cdd1a4e5e6e7469ef /libs/ardour/mtc_slave.cc
parent5c8c249db9436fe1741ebcce17b96fbb98bc418f (diff)
Add some libardour support for indicating MTC active status.
The general design here is wrong, because it should be more general and cover all possible sync sources. But it does work, it is used in Tracks, and my attempt to do it correctly revealed the problem to be an EXTREMELY difficult design issue (as in: two weeks of work on it did not really solve the fundamental issues with slave design). So, here it is for now, c/o Grygorii
Diffstat (limited to 'libs/ardour/mtc_slave.cc')
-rw-r--r--libs/ardour/mtc_slave.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/ardour/mtc_slave.cc b/libs/ardour/mtc_slave.cc
index 1a1c5f2bec..83d61163c9 100644
--- a/libs/ardour/mtc_slave.cc
+++ b/libs/ardour/mtc_slave.cc
@@ -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;
@@ -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;
}