summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/async_midi_port.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-06-19 23:41:26 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2016-09-27 14:59:29 -0500
commit8a06e6735d058cb132ef6f75df550353e2e0b70e (patch)
tree7ba5f583f2d78947988e5b2440ecdc38a33d6292 /libs/ardour/ardour/async_midi_port.h
parent1448be481f8ba11eb9401fb9024a506a7241b64a (diff)
add initial implementation of a "shadow port" for AsyncMIDIPort.
The shadow port is a secondary port that can be used to allow others to get a copy of part, all or none of the MIDI stream received by the owner (input) port.
Diffstat (limited to 'libs/ardour/ardour/async_midi_port.h')
-rw-r--r--libs/ardour/ardour/async_midi_port.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/libs/ardour/ardour/async_midi_port.h b/libs/ardour/ardour/async_midi_port.h
index 96a50ab198..931c404727 100644
--- a/libs/ardour/ardour/async_midi_port.h
+++ b/libs/ardour/ardour/async_midi_port.h
@@ -73,6 +73,9 @@ class LIBARDOUR_API AsyncMIDIPort : public ARDOUR::MidiPort, public MIDI::Port {
int selectable() const { return -1; }
void set_timer (boost::function<framecnt_t (void)>&);
+ void set_inbound_filter (boost::function<bool(MidiBuffer&,MidiBuffer&)>);
+ int add_shadow_port (std::string const &);
+
static void set_process_thread (pthread_t);
static pthread_t get_process_thread () { return _process_thread; }
static bool is_process_thread();
@@ -99,7 +102,10 @@ class LIBARDOUR_API AsyncMIDIPort : public ARDOUR::MidiPort, public MIDI::Port {
void make_connections ();
void init (std::string const &, Flags);
- void flush_output_fifo (pframes_t);
+ void flush_output_fifo (pframes_t);
+
+ boost::shared_ptr<MidiPort> shadow_port;
+ boost::function<bool(MidiBuffer&,MidiBuffer&)> inbound_midi_filter;
static pthread_t _process_thread;
};