Make MCP MasterPosition match MIDI port number.
authorLen Ovens <len@ovenwerks.net>
Thu, 6 Aug 2015 05:02:27 +0000 (22:02 -0700)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 10 Aug 2015 02:27:40 +0000 (22:27 -0400)
libs/surfaces/mackie/device_info.cc
libs/surfaces/mackie/surface.cc

index a50d25607ae320d21d1d00cc45e5f1e5fb8aec55..a4b967c8f461a9fa6312d90c21ed41cb6176b7f3 100644 (file)
@@ -246,6 +246,8 @@ DeviceInfo::set_state (const XMLNode& node, int /* version */)
                if ((prop = child->property ("value")) != 0) {
                        if ((_master_position = atoi (prop->value().c_str())) == 0) {
                                _master_position = 0;
+                       } else if (_master_position > 0) {
+                               _master_position --;
                        }
                }
        }
index b918f67025f02252766a3095d9533f0d2358ac14..6777d8e07e5d60bb6b30ac23b66cd69a0a77c801 100644 (file)
@@ -97,7 +97,7 @@ Surface::Surface (MackieControlProtocol& mcp, const std::string& device_name, ui
        /* lets use master_position instead */
        uint32_t mp = _mcp.device_info().master_position();
        if (_number == mp) {
-               DEBUG_TRACE (DEBUG::MackieControl, "Surface is first. Might have global controls.\n");
+               DEBUG_TRACE (DEBUG::MackieControl, "Surface matches MasterPosition. Might have global controls.\n");
                if (_mcp.device_info().has_global_controls()) {
                        init_controls ();
                        DEBUG_TRACE (DEBUG::MackieControl, "init_controls done\n");
@@ -508,6 +508,7 @@ Surface::handle_midi_controller_message (MIDI::Parser &, MIDI::EventTwoBytes* ev
                        _jog_wheel->jog_event (delta);
                        return;
                }
+               // add external (pedal?) control here
 
                return;
        }