diff options
author | Len Ovens <len@ovenwerks.net> | 2015-10-13 22:19:36 -0700 |
---|---|---|
committer | Len Ovens <len@ovenwerks.net> | 2015-10-13 22:19:36 -0700 |
commit | 1f856918705353635831f4feb6c4acba34e09f40 (patch) | |
tree | 64b191876271048fc8cb63d17f3178b47f6e587f | |
parent | 53a28c230adc1182f5b22ea6975aef9e12859511 (diff) |
fix MCP ports hang on device change and multi-surface device reconnect.
-rw-r--r-- | libs/surfaces/mackie/mackie_control_protocol.cc | 2 | ||||
-rw-r--r-- | libs/surfaces/mackie/surface.cc | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index 9e1a2bbce7..93b54e7d6a 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -809,7 +809,7 @@ MackieControlProtocol::create_surfaces () XMLNodeList const& devices = configuration_state->children(); for (XMLNodeList::const_iterator d = devices.begin(); d != devices.end(); ++d) { XMLProperty* prop = (*d)->property (X_("name")); - if (prop && prop->value() == device_name) { + if (prop && prop->value() == _device_info.name()) { this_device = *d; break; } diff --git a/libs/surfaces/mackie/surface.cc b/libs/surfaces/mackie/surface.cc index 8c4c10a336..954aeebca5 100644 --- a/libs/surfaces/mackie/surface.cc +++ b/libs/surfaces/mackie/surface.cc @@ -166,7 +166,9 @@ Surface::~Surface () delete _jog_wheel; delete _port; - + // the ports take time to release and we may be rebuilding right away + // in the case of changing devices. + g_usleep (100000); DEBUG_TRACE (DEBUG::MackieControl, "Surface::~Surface done\n"); } |