summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/midi_port.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-06-20 15:00:58 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2016-09-27 14:59:30 -0500
commitd1c024f4f9ef5b5d273d3fb86e066a53e28965cd (patch)
tree4f5f996f4d8e9189c24f00eaa57917fd759a58de /libs/ardour/ardour/midi_port.h
parent67620c353ff94dcaf8ee0f8cf003110535071a90 (diff)
move shadow port stuff from AsyncMIDIPort to MidiPort, where it belongs
Diffstat (limited to 'libs/ardour/ardour/midi_port.h')
-rw-r--r--libs/ardour/ardour/midi_port.h30
1 files changed, 19 insertions, 11 deletions
diff --git a/libs/ardour/ardour/midi_port.h b/libs/ardour/ardour/midi_port.h
index eb90dc1e35..3856d11ac5 100644
--- a/libs/ardour/ardour/midi_port.h
+++ b/libs/ardour/ardour/midi_port.h
@@ -58,6 +58,11 @@ class LIBARDOUR_API MidiPort : public Port {
void set_always_parse (bool yn);
void set_trace_on (bool yn);
+ typedef boost::function<bool(MidiBuffer&,MidiBuffer&)> MidiFilter;
+ void set_inbound_filter (MidiFilter);
+ int add_shadow_port (std::string const &, MidiFilter);
+ boost::shared_ptr<MidiPort> shadow_port() const { return _shadow_port; }
+
MIDI::Parser& self_parser() { return _self_parser; }
protected:
@@ -72,17 +77,20 @@ class LIBARDOUR_API MidiPort : public Port {
bool _input_active;
bool _always_parse;
bool _trace_on;
-
- /* Naming this is tricky. AsyncMIDIPort inherits (for now, aug 2013) from
- * both MIDI::Port, which has _parser, and this (ARDOUR::MidiPort). We
- * need parsing support in this object, independently of what the
- * MIDI::Port/AsyncMIDIPort stuff does. Rather than risk errors coming
- * from not explicitly naming which _parser we want, we will call this
- * _self_parser for now.
- *
- * Ultimately, MIDI::Port should probably go away or be fully integrated
- * into this object, somehow.
- */
+ MidiFilter inbound_midi_filter;
+ boost::shared_ptr<MidiPort> _shadow_port;
+ MidiFilter shadow_midi_filter;
+
+ /* Naming this is tricky. AsyncMIDIPort inherits (for now, aug 2013) from
+ * both MIDI::Port, which has _parser, and this (ARDOUR::MidiPort). We
+ * need parsing support in this object, independently of what the
+ * MIDI::Port/AsyncMIDIPort stuff does. Rather than risk errors coming
+ * from not explicitly naming which _parser we want, we will call this
+ * _self_parser for now.
+ *
+ * Ultimately, MIDI::Port should probably go away or be fully integrated
+ * into this object, somehow.
+ */
MIDI::Parser _self_parser;