From 36056597ce611f5c68b9daec989e014b2ad9a5b7 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 3 Jun 2023 22:26:08 +0200 Subject: [PATCH] GUI: use new MidiPort::set_tracer API --- gtk2_ardour/midi_tracer.cc | 8 ++++---- gtk2_ardour/tempo_dialog.cc | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gtk2_ardour/midi_tracer.cc b/gtk2_ardour/midi_tracer.cc index 72aeec2f7b..e89ff3926c 100644 --- a/gtk2_ardour/midi_tracer.cc +++ b/gtk2_ardour/midi_tracer.cc @@ -240,7 +240,7 @@ MidiTracer::port_changed () if (0 == tracer_port->connect (pn)) { _midi_parser = std::shared_ptr (new MIDI::Parser); _midi_parser->any.connect_same_thread (_parser_connection, boost::bind (&MidiTracer::tracer, this, _1, _2, _3, _4)); - //tracer_port->set_trace (_midi_parser); + tracer_port->set_trace (_midi_parser); } else { std::cerr << "CANNOT TRACE PORT " << pn << "\n"; } @@ -275,7 +275,7 @@ MidiTracer::port_changed () } else { _midi_parser = std::shared_ptr (new MIDI::Parser); _midi_parser->any.connect_same_thread (_parser_connection, boost::bind (&MidiTracer::tracer, this, _1, _2, _3, _4)); - //mp->set_trace (_midi_parser); + mp->set_trace (_midi_parser); traced_port = mp; } } @@ -291,10 +291,10 @@ MidiTracer::disconnect () _parser_connection.disconnect (); tracer_port->disconnect_all (); - //tracer_port->set_trace (std::weak_ptr()); + tracer_port->set_trace (std::weak_ptr()); if (traced_port) { - //traced_port->set_trace (std::weak_ptr()); + traced_port->set_trace (std::weak_ptr()); traced_port.reset (); } _midi_parser.reset (); diff --git a/gtk2_ardour/tempo_dialog.cc b/gtk2_ardour/tempo_dialog.cc index 1515c632e3..abb3ed2c37 100644 --- a/gtk2_ardour/tempo_dialog.cc +++ b/gtk2_ardour/tempo_dialog.cc @@ -292,7 +292,7 @@ TempoDialog::init (const Temporal::BBT_Time& when, double bpm, double end_bpm, d assert (_midi_tap_port); _midi_tap_parser = std::shared_ptr (new MIDI::Parser); _midi_tap_parser->any.connect_same_thread (_parser_connection, boost::bind (&TempoDialog::midi_event, this, _2, _3, _4)); - //_midi_tap_port->set_trace (_midi_tap_parser); + _midi_tap_port->set_trace (_midi_tap_parser); _midi_tap_signal.connect (_xthread_connection, invalidator (*this), boost::bind (&TempoDialog::tap_tempo, this, _1), gui_context ()); /* init state */