MCP: fix 2-char display message to avoid running status issues with JACK MIDI
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 10 Apr 2012 15:21:56 +0000 (15:21 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 10 Apr 2012 15:21:56 +0000 (15:21 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@11866 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/surfaces/mackie/mackie_midi_builder.cc

index f7c47f2abac39bfa93c10633f96ed2b4eaad90a5..53528b245975c3f0ac050a6da2825f4440664739 100644 (file)
@@ -186,11 +186,11 @@ MidiByteArray MackieMidiBuilder::two_char_display (const std::string & msg, cons
        if  (msg.length() != 2) throw MackieControlException ("MackieMidiBuilder::two_char_display: msg must be exactly 2 characters");
        if  (dots.length() != 2) throw MackieControlException ("MackieMidiBuilder::two_char_display: dots must be exactly 2 characters");
        
-       MidiByteArray bytes (5, 0xb0, 0x4a, 0x00, 0x4b, 0x00);
+       MidiByteArray bytes (6, 0xb0, 0x4a, 0x00, 0xb0, 0x4b, 0x00);
        
        // chars are understood by the surface in right-to-left order
        // could also exchange the 0x4a and 0x4b, above
-       bytes[4] = translate_seven_segment (msg[0]) +  (dots[0] == '.' ? 0x40 : 0x00);
+       bytes[5] = translate_seven_segment (msg[0]) +  (dots[0] == '.' ? 0x40 : 0x00);
        bytes[2] = translate_seven_segment (msg[1]) +  (dots[1] == '.' ? 0x40 : 0x00);
        
        return bytes;