add explict destructor for Pannable
[ardour.git] / libs / ardour / midi_ui.cc
index 70be1f345d075c05ec63e1f579c17f2f70db0a1d..2b39d6c0329b12b3204ce509c0bdf3c9e9be648b 100644 (file)
@@ -34,6 +34,7 @@
 
 using namespace std;
 using namespace ARDOUR;
+using namespace PBD;
 using namespace Glib;
 
 #include "i18n.h"
@@ -68,6 +69,12 @@ MidiControlUI::do_request (MidiUIRequest* req)
 
        } else if (req->type == CallSlot) {
 
+#ifndef NDEBUG
+               if (getenv ("DEBUG_THREADED_SIGNALS")) {
+                       cerr << "MIDI UI calls a slot\n";
+               }
+#endif
+
                req->the_slot ();
 
        } else if (req->type == Quit) {
@@ -89,18 +96,18 @@ MidiControlUI::change_midi_ports ()
 bool
 MidiControlUI::midi_input_handler (IOCondition ioc, MIDI::Port* port)
 {
+       DEBUG_TRACE (DEBUG::MidiIO, string_compose ("something happend on  %1\n", port->name()));
+
        if (ioc & ~IO_IN) {
                return false;
        }
 
        if (ioc & IO_IN) {
 
-               if (port->must_drain_selectable()) {
-                       CrossThreadChannel::drain (port->selectable());
-               }
+               CrossThreadChannel::drain (port->selectable());
 
                DEBUG_TRACE (DEBUG::MidiIO, string_compose ("data available on %1\n", port->name()));
-               nframes64_t now = _session.engine().frame_time();
+               framepos_t now = _session.engine().frame_time();
                port->parse (now);
        }
 
@@ -147,6 +154,8 @@ MidiControlUI::thread_init ()
 {      
        struct sched_param rtparam;
 
+       pthread_set_name (X_("midiUI"));
+
        PBD::notify_gui_about_thread_creation (X_("gui"), pthread_self(), X_("MIDI"), 2048);
        SessionEvent::create_per_thread_pool (X_("MIDI I/O"), 128);