From 33fe33f268640fd3fa725a472c9a572120e85a1e Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 8 Oct 2015 15:28:37 -0400 Subject: fix initialization sequence for ipMIDI Mackie surfaces --- libs/surfaces/mackie/surface.cc | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/libs/surfaces/mackie/surface.cc b/libs/surfaces/mackie/surface.cc index 5ee2e81abd..20f02f8aab 100644 --- a/libs/surfaces/mackie/surface.cc +++ b/libs/surfaces/mackie/surface.cc @@ -124,10 +124,20 @@ Surface::Surface (MackieControlProtocol& mcp, const std::string& device_name, ui DEBUG_TRACE (DEBUG::MackieControl, "init_strips done\n"); } - /* - */ + if (!_mcp.device_info().uses_ipmidi()) { + ARDOUR::AudioEngine::instance()->PortConnectedOrDisconnected.connect (port_connection, MISSING_INVALIDATOR, boost::bind (&Surface::connection_handler, this, _1, _2, _3, _4, _5), &_mcp); + } else { + /* ipMIDI port already exists, we can just assume that we're + * connected. + * + * If the user still hasn't connected the ipMIDI surface and/or + * turned it on, then they have to press "Discover Mackie + * Devices" in the GUI at the right time. + */ - ARDOUR::AudioEngine::instance()->PortConnectedOrDisconnected.connect (port_connection, MISSING_INVALIDATOR, boost::bind (&Surface::connection_handler, this, _1, _2, _3, _4, _5), &_mcp); + connection_state |= (InputConnected|OutputConnected); + connected (); + } connect_to_signals (); -- cgit v1.2.3