diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-03-06 20:15:28 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-03-06 20:15:28 +0000 |
commit | 8f091de64b436fdefa87ae6dae42e5a23889e3c2 (patch) | |
tree | 7a6f26f5102ef22ebc5384aa016f3f8bb100742a /libs/surfaces/mackie/mackie_control_protocol.cc | |
parent | 95c86bec2d23ddbb3aef49190bacd333af1d1b5b (diff) |
for MCP devices that don't handshake, turn them on as soon as we call ::connectivity_established() so that _active == true, and we will actually write to them
git-svn-id: svn://localhost/ardour2/branches/3.0@14165 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/surfaces/mackie/mackie_control_protocol.cc')
-rw-r--r-- | libs/surfaces/mackie/mackie_control_protocol.cc | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index 1c367c4b47..9749383ab6 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -178,6 +178,12 @@ MackieControlProtocol::midi_connectivity_established () for (Surfaces::const_iterator si = surfaces.begin(); si != surfaces.end(); ++si) { (*si)->say_hello (); } + + if (_device_info.no_handshake()) { + for (Surfaces::const_iterator si = surfaces.begin(); si != surfaces.end(); ++si) { + (*si)->turn_it_on (); + } + } } // go to the previous track. @@ -532,21 +538,23 @@ MackieControlProtocol::update_surfaces() void MackieControlProtocol::initialize() { - Glib::Threads::Mutex::Lock lm (surfaces_lock); - - if (surfaces.empty()) { - return; - } - - if (!surfaces.front()->active ()) { - return; + { + Glib::Threads::Mutex::Lock lm (surfaces_lock); + + if (surfaces.empty()) { + return; + } + + if (!surfaces.front()->active ()) { + return; + } + + // sometimes the jog wheel is a pot + if (_device_info.has_jog_wheel()) { + surfaces.front()->blank_jog_ring (); + } } - // sometimes the jog wheel is a pot - if (_device_info.has_jog_wheel()) { - surfaces.front()->blank_jog_ring (); - } - // update global buttons and displays notify_record_state_changed(); |