remove unused function
[ardour.git] / gtk2_ardour / midi_tracer.cc
index cbf500ff99b321df4ca4db57085044bd04f12c27..081e4fedd3398f0435d5b060dd45a9deca1fc6d2 100644 (file)
@@ -179,6 +179,8 @@ MidiTracer::port_changed ()
 
                if (mp) {
                        mp->self_parser().any.connect_same_thread (_parser_connection, boost::bind (&MidiTracer::tracer, this, _1, _2, _3));
+                       mp->set_trace_on (true);
+                       traced_port = mp;
                }
                
        } else {
@@ -190,6 +192,11 @@ void
 MidiTracer::disconnect ()
 {
        _parser_connection.disconnect ();
+
+       if (traced_port) {
+               traced_port->set_trace_on (false);
+               traced_port.reset ();
+       }
 }
 
 void
@@ -273,9 +280,9 @@ MidiTracer::tracer (Parser&, byte* msg, size_t len)
 
        case MIDI::pitchbend:
                if (show_hex) {
-                       s += snprintf (&buf[s], bufsize, "%16s chn %2d %02x\n", "Pitch Bend", (msg[0]&0xf)+1, (int) msg[1]);
+                       s += snprintf (&buf[s], bufsize, "%16s chn %2d %02x %02x\n", "Pitch Bend", (msg[0]&0xf)+1, (int) msg[1], (int) msg[2]);
                } else {
-                       s += snprintf (&buf[s], bufsize, "%16s chn %2d %-3d\n", "Pitch Bend", (msg[0]&0xf)+1, (int) msg[1]);
+                       s += snprintf (&buf[s], bufsize, "%16s chn %2d %-3d %-3d\n", "Pitch Bend", (msg[0]&0xf)+1, (int) msg[1], (int) msg[2]);
                }
                break;