diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-10-10 17:13:04 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-10-10 17:14:30 -0400 |
commit | 965b13584213319b0edd7e0a95992c1ea69f16c9 (patch) | |
tree | 227dafec1ed7c14aa1c480300769dfc2e0751c35 /libs/surfaces/mackie/surface.cc | |
parent | 7c58b4de5f269083df2201df1976b98afb823cd5 (diff) |
numerous changes to Mackie support, generally offering better robustness
Diffstat (limited to 'libs/surfaces/mackie/surface.cc')
-rw-r--r-- | libs/surfaces/mackie/surface.cc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/libs/surfaces/mackie/surface.cc b/libs/surfaces/mackie/surface.cc index 7709ebb264..3b42aa1e8f 100644 --- a/libs/surfaces/mackie/surface.cc +++ b/libs/surfaces/mackie/surface.cc @@ -37,6 +37,8 @@ #include "ardour/session.h" #include "ardour/utils.h" +#include <gtkmm2ext/gui_thread.h> + #include "control_group.h" #include "surface_port.h" #include "surface.h" @@ -221,6 +223,13 @@ Surface::connection_handler (boost::weak_ptr<ARDOUR::Port>, std::string name1, b to queue it with the MCP event loop. */ + /* XXX this is a horrible hack. Without a short sleep here, + something prevents the device wakeup messages from being + sent and/or the responses from being received. + */ + + g_usleep (100000); + connected (); } else { @@ -662,9 +671,7 @@ Surface::handle_midi_sysex (MIDI::Parser &, MIDI::byte * raw_bytes, size_t count write_sysex (host_connection_query (bytes)); } else { DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Mackie Control Device ready, current status = %1\n", _active)); - if (!_active) { - turn_it_on (); - } + turn_it_on (); } break; @@ -672,7 +679,7 @@ Surface::handle_midi_sysex (MIDI::Parser &, MIDI::byte * raw_bytes, size_t count DEBUG_TRACE (DEBUG::MackieControl, "Logic Control Device confirms connection, ardour replies\n"); if (bytes[4] == 0x10 || bytes[4] == 0x11) { write_sysex (host_connection_confirmation (bytes)); - _active = true; + turn_it_on (); } break; |