summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-11-24 23:20:39 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2015-11-24 23:20:39 -0500
commit35577f439d3ca8b4e9b5e5788fe7eca90a9c2247 (patch)
treec925ce14fbad86289ad8538308ab308cd874e90e
parent2ea4d5c7b56d097c17d1688d499b98a4a7c5fc2d (diff)
add debug "bits" for FaderPort
-rw-r--r--libs/ardour/ardour/debug.h3
-rw-r--r--libs/ardour/debug.cc1
-rw-r--r--libs/surfaces/faderport/faderport.cc18
3 files changed, 12 insertions, 10 deletions
diff --git a/libs/ardour/ardour/debug.h b/libs/ardour/ardour/debug.h
index d7cb27f6c1..6ebf21a958 100644
--- a/libs/ardour/ardour/debug.h
+++ b/libs/ardour/ardour/debug.h
@@ -75,7 +75,8 @@ namespace PBD {
LIBARDOUR_API extern DebugBits BackendTiming;
LIBARDOUR_API extern DebugBits BackendThreads;
LIBARDOUR_API extern DebugBits BackendPorts;
- LIBARDOUR_API extern DebugBits VSTCallbacks;;
+ LIBARDOUR_API extern DebugBits VSTCallbacks;
+ LIBARDOUR_API extern DebugBits FaderPort;
}
}
diff --git a/libs/ardour/debug.cc b/libs/ardour/debug.cc
index 54b6741683..86afaf6917 100644
--- a/libs/ardour/debug.cc
+++ b/libs/ardour/debug.cc
@@ -73,3 +73,4 @@ PBD::DebugBits PBD::DEBUG::BackendTiming = PBD::new_debug_bit ("backendtiming");
PBD::DebugBits PBD::DEBUG::BackendThreads = PBD::new_debug_bit ("backendthreads");
PBD::DebugBits PBD::DEBUG::BackendPorts = PBD::new_debug_bit ("backendports");
PBD::DebugBits PBD::DEBUG::VSTCallbacks = PBD::new_debug_bit ("vstcallbacks");
+PBD::DebugBits PBD::DEBUG::FaderPort = PBD::new_debug_bit ("faderport");
diff --git a/libs/surfaces/faderport/faderport.cc b/libs/surfaces/faderport/faderport.cc
index 2b447095fc..c5f707655b 100644
--- a/libs/surfaces/faderport/faderport.cc
+++ b/libs/surfaces/faderport/faderport.cc
@@ -145,14 +145,14 @@ FaderPort::FaderPort (Session& s)
FaderPort::~FaderPort ()
{
if (_input_port) {
- DEBUG_TRACE (DEBUG::GenericMidi, string_compose ("unregistering input port %1\n", boost::shared_ptr<ARDOUR::Port>(_input_port)->name()));
+ DEBUG_TRACE (DEBUG::FaderPort, string_compose ("unregistering input port %1\n", boost::shared_ptr<ARDOUR::Port>(_input_port)->name()));
AudioEngine::instance()->unregister_port (_input_port);
_input_port.reset ();
}
if (_output_port) {
// _output_port->drain (10000); //ToDo: is this necessary? It hangs the shutdown, for me
- DEBUG_TRACE (DEBUG::GenericMidi, string_compose ("unregistering output port %1\n", boost::shared_ptr<ARDOUR::Port>(_output_port)->name()));
+ DEBUG_TRACE (DEBUG::FaderPort, string_compose ("unregistering output port %1\n", boost::shared_ptr<ARDOUR::Port>(_output_port)->name()));
AudioEngine::instance()->unregister_port (_output_port);
_output_port.reset ();
}
@@ -346,7 +346,7 @@ FaderPort::sysex_handler (MIDI::Parser &p, MIDI::byte *buf, size_t sz)
int
FaderPort::set_active (bool yn)
{
- // DEBUG_TRACE (DEBUG::MackieControl, string_compose("MackieControlProtocol::set_active init with yn: '%1'\n", yn));
+ DEBUG_TRACE (DEBUG::FaderPort, string_compose("MackieControlProtocol::set_active init with yn: '%1'\n", yn));
if (yn == active()) {
return 0;
@@ -373,7 +373,7 @@ FaderPort::set_active (bool yn)
ControlProtocol::set_active (yn);
- // DEBUG_TRACE (DEBUG::MackieControl, string_compose("MackieControlProtocol::set_active done with yn: '%1'\n", yn));
+ DEBUG_TRACE (DEBUG::FaderPort, string_compose("MackieControlProtocol::set_active done with yn: '%1'\n", yn));
return 0;
}
@@ -393,6 +393,8 @@ FaderPort::blink ()
void
FaderPort::close ()
{
+ all_lights_out ();
+
stop_midi_handling ();
session_connections.drop_connections ();
port_connection.disconnect ();
@@ -400,8 +402,6 @@ FaderPort::close ()
#if 0
route_connections.drop_connections ();
-
- clear_surfaces();
#endif
}
@@ -471,7 +471,7 @@ FaderPort::send_feedback ()
bool
FaderPort::midi_input_handler (Glib::IOCondition ioc, boost::shared_ptr<ARDOUR::AsyncMIDIPort> port)
{
- DEBUG_TRACE (DEBUG::MidiIO, string_compose ("something happend on %1\n", boost::shared_ptr<MIDI::Port>(port)->name()));
+ DEBUG_TRACE (DEBUG::FaderPort, string_compose ("something happend on %1\n", boost::shared_ptr<MIDI::Port>(port)->name()));
if (ioc & ~IO_IN) {
return false;
@@ -483,7 +483,7 @@ FaderPort::midi_input_handler (Glib::IOCondition ioc, boost::shared_ptr<ARDOUR::
port->clear ();
}
- DEBUG_TRACE (DEBUG::MidiIO, string_compose ("data available on %1\n", boost::shared_ptr<MIDI::Port>(port)->name()));
+ DEBUG_TRACE (DEBUG::FaderPort, string_compose ("data available on %1\n", boost::shared_ptr<MIDI::Port>(port)->name()));
framepos_t now = session->engine().sample_time();
port->parse (now);
}
@@ -631,7 +631,7 @@ FaderPort::connection_handler (boost::weak_ptr<ARDOUR::Port>, std::string name1,
connected ();
} else {
- // DEBUG_TRACE (DEBUG::FaderPort, string_compose ("Surface %1 disconnected (input or output or both)\n", _name));
+ DEBUG_TRACE (DEBUG::FaderPort, "Device disconnected (input or output or both)\n");
_device_active = false;
}