13
0

reduce verbosity of -D mackie in the presence of continued handshaking/keepalive messages.

This commit is contained in:
Paul Davis 2016-06-12 08:18:01 -04:00
parent 45119f5422
commit 4717080aee
2 changed files with 14 additions and 5 deletions

View File

@ -1630,7 +1630,7 @@ MackieControlProtocol::midi_input_handler (IOCondition ioc, MIDI::Port* port)
if (ioc & IO_IN) {
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("something happend on %1\n", port->name()));
// DEBUG_TRACE (DEBUG::MackieControl, string_compose ("something happend on %1\n", port->name()));
/* Devices using regular JACK MIDI ports will need to have
the x-thread FIFO drained to avoid burning endless CPU.
@ -1647,7 +1647,7 @@ MackieControlProtocol::midi_input_handler (IOCondition ioc, MIDI::Port* port)
}
}
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("data available on %1\n", port->name()));
// DEBUG_TRACE (DEBUG::MackieControl, string_compose ("data available on %1\n", port->name()));
framepos_t now = session->engine().sample_time();
port->parse (now);
}

View File

@ -675,8 +675,6 @@ Surface::handle_midi_sysex (MIDI::Parser &, MIDI::byte * raw_bytes, size_t count
{
MidiByteArray bytes (count, raw_bytes);
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("handle_midi_sysex: %1\n", bytes));
if (_mcp.device_info().no_handshake()) {
turn_it_on ();
}
@ -693,6 +691,9 @@ Surface::handle_midi_sysex (MIDI::Parser &, MIDI::byte * raw_bytes, size_t count
switch (bytes[5]) {
case 0x01:
if (!_active) {
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("handle_midi_sysex: %1\n", bytes));
}
/* MCP: Device Ready
LCP: Connection Challenge
*/
@ -700,12 +701,17 @@ Surface::handle_midi_sysex (MIDI::Parser &, MIDI::byte * raw_bytes, size_t count
DEBUG_TRACE (DEBUG::MackieControl, "Logic Control Device connection challenge\n");
write_sysex (host_connection_query (bytes));
} else {
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Mackie Control Device ready, current status = %1\n", _active));
if (!_active) {
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Mackie Control Device ready, current status = %1\n", _active));
}
turn_it_on ();
}
break;
case 0x06:
if (!_active) {
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("handle_midi_sysex: %1\n", bytes));
}
/* Behringer X-Touch Compact: Device Ready
*/
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Behringer X-Touch Compact ready, current status = %1\n", _active));
@ -713,6 +719,7 @@ Surface::handle_midi_sysex (MIDI::Parser &, MIDI::byte * raw_bytes, size_t count
break;
case 0x03: /* LCP Connection Confirmation */
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("handle_midi_sysex: %1\n", bytes));
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));
@ -721,11 +728,13 @@ Surface::handle_midi_sysex (MIDI::Parser &, MIDI::byte * raw_bytes, size_t count
break;
case 0x04: /* LCP: Confirmation Denied */
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("handle_midi_sysex: %1\n", bytes));
DEBUG_TRACE (DEBUG::MackieControl, "Logic Control Device denies connection\n");
_active = false;
break;
default:
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("handle_midi_sysex: %1\n", bytes));
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("unknown device ID byte %1", (int) bytes[5]));
error << "MCP: unknown sysex: " << bytes << endmsg;
}