diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-06-20 15:00:58 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-09-27 14:59:30 -0500 |
commit | d1c024f4f9ef5b5d273d3fb86e066a53e28965cd (patch) | |
tree | 4f5f996f4d8e9189c24f00eaa57917fd759a58de /libs/ardour/ardour | |
parent | 67620c353ff94dcaf8ee0f8cf003110535071a90 (diff) |
move shadow port stuff from AsyncMIDIPort to MidiPort, where it belongs
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r-- | libs/ardour/ardour/async_midi_port.h | 10 | ||||
-rw-r--r-- | libs/ardour/ardour/midi_port.h | 30 |
2 files changed, 19 insertions, 21 deletions
diff --git a/libs/ardour/ardour/async_midi_port.h b/libs/ardour/ardour/async_midi_port.h index acf9730e84..39fee02878 100644 --- a/libs/ardour/ardour/async_midi_port.h +++ b/libs/ardour/ardour/async_midi_port.h @@ -73,11 +73,6 @@ class LIBARDOUR_API AsyncMIDIPort : public ARDOUR::MidiPort, public MIDI::Port { int selectable() const { return -1; } void set_timer (boost::function<framecnt_t (void)>&); - 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; } - static void set_process_thread (pthread_t); static pthread_t get_process_thread () { return _process_thread; } static bool is_process_thread(); @@ -105,11 +100,6 @@ class LIBARDOUR_API AsyncMIDIPort : public ARDOUR::MidiPort, public MIDI::Port { void flush_output_fifo (pframes_t); - MidiFilter inbound_midi_filter; - - boost::shared_ptr<MidiPort> _shadow_port; - MidiFilter shadow_midi_filter; - static pthread_t _process_thread; }; 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; |