summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2020-03-12 09:21:10 -0600
committerPaul Davis <paul@linuxaudiosystems.com>2020-03-13 13:52:38 -0600
commitcf15b6ad7a76a90d86571c220531f3d946b8c481 (patch)
tree6df8ad35ab1eff0481a14d6700fc7b36284ad6a7
parent26b6b8d84000c7cc0a2af64b7084557a8b0395af (diff)
prevent out-of-window MTC messages from moving transport if we're not using MTC
in 5.x, we would only run the MTC parsing code if slaved to MTC. That's no longer true in 6.0, and without this change, MTC will cause a locate at startup
-rw-r--r--libs/ardour/mtc_slave.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/libs/ardour/mtc_slave.cc b/libs/ardour/mtc_slave.cc
index c4af3f9bc7..797ba5244a 100644
--- a/libs/ardour/mtc_slave.cc
+++ b/libs/ardour/mtc_slave.cc
@@ -33,6 +33,7 @@
#include "ardour/midi_port.h"
#include "ardour/session.h"
#include "ardour/transport_master.h"
+#include "ardour/transport_master_manager.h"
#include "pbd/i18n.h"
@@ -429,9 +430,12 @@ MTC_TransportMaster::update_mtc_time (const MIDI::byte *msg, bool was_full, samp
if (was_full || outside_window (mtc_frame)) {
DEBUG_TRACE (DEBUG::MTC, string_compose ("update_mtc_time: full TC %1 or outside window %2 MTC %3\n", was_full, outside_window (mtc_frame), mtc_frame));
- _session->set_requested_return_sample (-1);
- _session->request_transport_speed (0, TRS_MTC);
- _session->request_locate (mtc_frame, MustStop, TRS_MTC);
+ boost::shared_ptr<TransportMaster> c = TransportMasterManager::instance().current();
+ if (c && c.get() == this) {
+ _session->set_requested_return_sample (-1);
+ _session->request_transport_speed (0, TRS_MTC);
+ _session->request_locate (mtc_frame, MustStop, TRS_MTC);
+ }
update_mtc_status (MIDI::MTC_Stopped);
reset (false);
reset_window (mtc_frame);