diff options
author | Len Ovens <len@ovenwerks.net> | 2015-07-09 18:16:44 -0700 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-07-10 16:52:43 -0400 |
commit | 6349570fb24b03694e814dfff344faea92659054 (patch) | |
tree | e775c008f90c24c98cf24ee065adef018757006c /libs/surfaces/generic_midi/generic_midi_control_protocol.cc | |
parent | 81bd6469fc9c8df9b28dc0c13451766c3f4efa02 (diff) |
Add debug for generic midi control
Diffstat (limited to 'libs/surfaces/generic_midi/generic_midi_control_protocol.cc')
-rw-r--r-- | libs/surfaces/generic_midi/generic_midi_control_protocol.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libs/surfaces/generic_midi/generic_midi_control_protocol.cc b/libs/surfaces/generic_midi/generic_midi_control_protocol.cc index 85a81400c4..c13fee0e4f 100644 --- a/libs/surfaces/generic_midi/generic_midi_control_protocol.cc +++ b/libs/surfaces/generic_midi/generic_midi_control_protocol.cc @@ -30,6 +30,7 @@ #include "pbd/failed_constructor.h" #include "pbd/file_utils.h" #include "pbd/xml++.h" +#include "pbd/compose.h" #include "midi++/port.h" @@ -40,6 +41,7 @@ #include "ardour/midi_ui.h" #include "ardour/rc_configuration.h" #include "ardour/midiport_manager.h" +#include "ardour/debug.h" #include "generic_midi_control_protocol.h" #include "midicontrollable.h" @@ -174,6 +176,7 @@ GenericMidiControlProtocol::reload_maps () void GenericMidiControlProtocol::drop_all () { + DEBUG_TRACE (DEBUG::GenericMidi, "Drop all bindings\n"); Glib::Threads::Mutex::Lock lm (pending_lock); Glib::Threads::Mutex::Lock lm2 (controllables_lock); @@ -201,6 +204,7 @@ GenericMidiControlProtocol::drop_all () void GenericMidiControlProtocol::drop_bindings () { + DEBUG_TRACE (DEBUG::GenericMidi, "Drop bindings, leave learned\n"); Glib::Threads::Mutex::Lock lm2 (controllables_lock); for (MIDIControllables::iterator i = controllables.begin(); i != controllables.end(); ) { @@ -453,7 +457,7 @@ GenericMidiControlProtocol::create_binding (PBD::Controllable* control, int pos, // Update the MIDI Controllable based on the the pos param // Here is where a table lookup for user mappings could go; for now we'll just wing it... mc->bind_midi(channel, MIDI::controller, value); - + DEBUG_TRACE (DEBUG::GenericMidi, string_compose ("Create binding: Channel: %1 Controller: %2 Value: %3 \n", channel, MIDI::controller, value)); controllables.push_back (mc); } } @@ -597,6 +601,7 @@ GenericMidiControlProtocol::get_feedback () const int GenericMidiControlProtocol::load_bindings (const string& xmlpath) { + DEBUG_TRACE (DEBUG::GenericMidi, "Load bindings: Reading midi map\n"); XMLTree state_tree; if (!state_tree.read (xmlpath.c_str())) { @@ -632,6 +637,7 @@ GenericMidiControlProtocol::load_bindings (const string& xmlpath) drop_all (); + DEBUG_TRACE (DEBUG::GenericMidi, "Loading bindings\n"); for (citer = children.begin(); citer != children.end(); ++citer) { if ((*citer)->name() == "DeviceInfo") { |