mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 08:36:32 +01:00
add debug "bits" for FaderPort
This commit is contained in:
parent
2ea4d5c7b5
commit
35577f439d
3 changed files with 12 additions and 10 deletions
|
|
@ -75,7 +75,8 @@ namespace PBD {
|
||||||
LIBARDOUR_API extern DebugBits BackendTiming;
|
LIBARDOUR_API extern DebugBits BackendTiming;
|
||||||
LIBARDOUR_API extern DebugBits BackendThreads;
|
LIBARDOUR_API extern DebugBits BackendThreads;
|
||||||
LIBARDOUR_API extern DebugBits BackendPorts;
|
LIBARDOUR_API extern DebugBits BackendPorts;
|
||||||
LIBARDOUR_API extern DebugBits VSTCallbacks;;
|
LIBARDOUR_API extern DebugBits VSTCallbacks;
|
||||||
|
LIBARDOUR_API extern DebugBits FaderPort;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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::BackendThreads = PBD::new_debug_bit ("backendthreads");
|
||||||
PBD::DebugBits PBD::DEBUG::BackendPorts = PBD::new_debug_bit ("backendports");
|
PBD::DebugBits PBD::DEBUG::BackendPorts = PBD::new_debug_bit ("backendports");
|
||||||
PBD::DebugBits PBD::DEBUG::VSTCallbacks = PBD::new_debug_bit ("vstcallbacks");
|
PBD::DebugBits PBD::DEBUG::VSTCallbacks = PBD::new_debug_bit ("vstcallbacks");
|
||||||
|
PBD::DebugBits PBD::DEBUG::FaderPort = PBD::new_debug_bit ("faderport");
|
||||||
|
|
|
||||||
|
|
@ -145,14 +145,14 @@ FaderPort::FaderPort (Session& s)
|
||||||
FaderPort::~FaderPort ()
|
FaderPort::~FaderPort ()
|
||||||
{
|
{
|
||||||
if (_input_port) {
|
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);
|
AudioEngine::instance()->unregister_port (_input_port);
|
||||||
_input_port.reset ();
|
_input_port.reset ();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_output_port) {
|
if (_output_port) {
|
||||||
// _output_port->drain (10000); //ToDo: is this necessary? It hangs the shutdown, for me
|
// _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);
|
AudioEngine::instance()->unregister_port (_output_port);
|
||||||
_output_port.reset ();
|
_output_port.reset ();
|
||||||
}
|
}
|
||||||
|
|
@ -346,7 +346,7 @@ FaderPort::sysex_handler (MIDI::Parser &p, MIDI::byte *buf, size_t sz)
|
||||||
int
|
int
|
||||||
FaderPort::set_active (bool yn)
|
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()) {
|
if (yn == active()) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -373,7 +373,7 @@ FaderPort::set_active (bool yn)
|
||||||
|
|
||||||
ControlProtocol::set_active (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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -393,6 +393,8 @@ FaderPort::blink ()
|
||||||
void
|
void
|
||||||
FaderPort::close ()
|
FaderPort::close ()
|
||||||
{
|
{
|
||||||
|
all_lights_out ();
|
||||||
|
|
||||||
stop_midi_handling ();
|
stop_midi_handling ();
|
||||||
session_connections.drop_connections ();
|
session_connections.drop_connections ();
|
||||||
port_connection.disconnect ();
|
port_connection.disconnect ();
|
||||||
|
|
@ -400,8 +402,6 @@ FaderPort::close ()
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
route_connections.drop_connections ();
|
route_connections.drop_connections ();
|
||||||
|
|
||||||
clear_surfaces();
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -471,7 +471,7 @@ FaderPort::send_feedback ()
|
||||||
bool
|
bool
|
||||||
FaderPort::midi_input_handler (Glib::IOCondition ioc, boost::shared_ptr<ARDOUR::AsyncMIDIPort> port)
|
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) {
|
if (ioc & ~IO_IN) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -483,7 +483,7 @@ FaderPort::midi_input_handler (Glib::IOCondition ioc, boost::shared_ptr<ARDOUR::
|
||||||
port->clear ();
|
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();
|
framepos_t now = session->engine().sample_time();
|
||||||
port->parse (now);
|
port->parse (now);
|
||||||
}
|
}
|
||||||
|
|
@ -631,7 +631,7 @@ FaderPort::connection_handler (boost::weak_ptr<ARDOUR::Port>, std::string name1,
|
||||||
connected ();
|
connected ();
|
||||||
|
|
||||||
} else {
|
} 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;
|
_device_active = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue