mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 16:24:57 +01:00
minor tweak to MIDISurface API
Allows connecting additional ports to our parsers
This commit is contained in:
parent
13508efef3
commit
45e3408595
2 changed files with 9 additions and 2 deletions
|
|
@ -301,9 +301,15 @@ MIDISurface::midi_input_handler (IOCondition ioc, MIDI::Port* port)
|
||||||
void
|
void
|
||||||
MIDISurface::connect_to_parser ()
|
MIDISurface::connect_to_parser ()
|
||||||
{
|
{
|
||||||
DEBUG_TRACE (DEBUG::MIDISurface, string_compose ("Connecting to signals on port %2\n", _input_port->name()));
|
connect_to_port_parser (*_input_port);
|
||||||
|
}
|
||||||
|
|
||||||
MIDI::Parser* p = _input_port->parser();
|
void
|
||||||
|
MIDISurface::connect_to_port_parser (MIDI::Port& port)
|
||||||
|
{
|
||||||
|
DEBUG_TRACE (DEBUG::MIDISurface, string_compose ("Connecting to signals on port %1\n", port.name()));
|
||||||
|
|
||||||
|
MIDI::Parser* p = port.parser();
|
||||||
|
|
||||||
/* Incoming sysex */
|
/* Incoming sysex */
|
||||||
p->sysex.connect_same_thread (*this, boost::bind (&MIDISurface::handle_midi_sysex, this, _1, _2, _3));
|
p->sysex.connect_same_thread (*this, boost::bind (&MIDISurface::handle_midi_sysex, this, _1, _2, _3));
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,7 @@ class MIDISurface : public ARDOUR::ControlProtocol
|
||||||
void do_request (MidiSurfaceRequest*);
|
void do_request (MidiSurfaceRequest*);
|
||||||
|
|
||||||
virtual void connect_to_parser ();
|
virtual void connect_to_parser ();
|
||||||
|
virtual void connect_to_port_parser (MIDI::Port&);
|
||||||
virtual void handle_midi_pitchbend_message (MIDI::Parser&, MIDI::pitchbend_t) {}
|
virtual void handle_midi_pitchbend_message (MIDI::Parser&, MIDI::pitchbend_t) {}
|
||||||
virtual void handle_midi_polypressure_message (MIDI::Parser&, MIDI::EventTwoBytes*) {}
|
virtual void handle_midi_polypressure_message (MIDI::Parser&, MIDI::EventTwoBytes*) {}
|
||||||
virtual void handle_midi_controller_message (MIDI::Parser&, MIDI::EventTwoBytes*) {}
|
virtual void handle_midi_controller_message (MIDI::Parser&, MIDI::EventTwoBytes*) {}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue