GUI: use new MidiPort::set_tracer API
This commit is contained in:
parent
7e567468b2
commit
36056597ce
@ -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 ();
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user