13
0

GUI: use new MidiPort::set_tracer API

This commit is contained in:
Robin Gareus 2023-06-03 22:26:08 +02:00
parent 7e567468b2
commit 36056597ce
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 5 additions and 5 deletions

View File

@ -240,7 +240,7 @@ MidiTracer::port_changed ()
if (0 == tracer_port->connect (pn)) {
_midi_parser = std::shared_ptr<MIDI::Parser> (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<MIDI::Parser> (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<MIDI::Parser>());
tracer_port->set_trace (std::weak_ptr<MIDI::Parser>());
if (traced_port) {
//traced_port->set_trace (std::weak_ptr<MIDI::Parser>());
traced_port->set_trace (std::weak_ptr<MIDI::Parser>());
traced_port.reset ();
}
_midi_parser.reset ();

View File

@ -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<MIDI::Parser> (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 */