diff options
author | Robin Gareus <robin@gareus.org> | 2020-05-11 03:42:21 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-05-11 03:42:21 +0200 |
commit | 58c5f75fc9cda7a8b3282c4ac74dd80f397c91f2 (patch) | |
tree | f8eba62162f21fc379314f07323b62061b9ee380 /libs | |
parent | a6ffc6213b92735034bd7dc39638e926bca219da (diff) |
Fix TCM requiring port-reconnect when engine restarts
An engine restart sends dis-connect messages for the reverse
port-mapping (after making the connection):
Connect: system:midi_capture_41a56f90 -> ardour:MTC in
Connect: system:capture_1 -> ardour:LTC in
DisConnect: ardour:MTC in -> system:midi_capture_41a56f90
DisConnect: ardour:LTC in -> system:capture_1
This lead to TransportMaster being marked as inactive.
This is likely an issue that should be fixed elsewhere, but in
case of JACK, we likely do not have control over this.
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ltc_slave.cc | 5 | ||||
-rw-r--r-- | libs/ardour/mtc_slave.cc | 5 | ||||
-rw-r--r-- | libs/ardour/transport_master.cc | 8 |
3 files changed, 7 insertions, 11 deletions
diff --git a/libs/ardour/ltc_slave.cc b/libs/ardour/ltc_slave.cc index 1e8ff2b24e..dc0d1b2669 100644 --- a/libs/ardour/ltc_slave.cc +++ b/libs/ardour/ltc_slave.cc @@ -129,9 +129,8 @@ LTC_TransportMaster::connection_handler (boost::weak_ptr<ARDOUR::Port> w0, std:: { TransportMaster::connection_handler(w0, n0, w1, n1, con); - boost::shared_ptr<Port> p0 = w0.lock (); - boost::shared_ptr<Port> p1 = w1.lock (); - if (p0 == _port || p1 == _port) { + boost::shared_ptr<Port> p = w1.lock (); + if (p == _port) { resync_latency (false); } } diff --git a/libs/ardour/mtc_slave.cc b/libs/ardour/mtc_slave.cc index 834eb0aad1..e228c8cd60 100644 --- a/libs/ardour/mtc_slave.cc +++ b/libs/ardour/mtc_slave.cc @@ -94,9 +94,8 @@ MTC_TransportMaster::connection_handler (boost::weak_ptr<ARDOUR::Port> w0, std:: { TransportMaster::connection_handler(w0, n0, w1, n1, con); - boost::shared_ptr<Port> p0 = w0.lock (); - boost::shared_ptr<Port> p1 = w1.lock (); - if (p0 == _port || p1 == _port) { + boost::shared_ptr<Port> p = w1.lock (); + if (p == _port) { resync_latency (false); } } diff --git a/libs/ardour/transport_master.cc b/libs/ardour/transport_master.cc index 1794fca354..2faa5dc715 100644 --- a/libs/ardour/transport_master.cc +++ b/libs/ardour/transport_master.cc @@ -164,16 +164,14 @@ TransportMaster::set_name (std::string const & str) } void -TransportMaster::connection_handler (boost::weak_ptr<ARDOUR::Port>, std::string name1, boost::weak_ptr<ARDOUR::Port>, std::string name2, bool yn) +TransportMaster::connection_handler (boost::weak_ptr<ARDOUR::Port>, std::string, boost::weak_ptr<ARDOUR::Port> w1, std::string, bool yn) { if (!_port) { return; } - const std::string fqn = ARDOUR::AudioEngine::instance()->make_port_name_non_relative (_port->name()); - - if (fqn == name1 || fqn == name2) { - + boost::shared_ptr<Port> p = w1.lock (); + if (p == _port) { /* it's about us */ /* XXX technically .. if the user makes an N->1 connection to |