summaryrefslogtreecommitdiff
path: root/libs/ardour/async_midi_port.cc
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/async_midi_port.cc
parent67620c353ff94dcaf8ee0f8cf003110535071a90 (diff)
move shadow port stuff from AsyncMIDIPort to MidiPort, where it belongs
Diffstat (limited to 'libs/ardour/async_midi_port.cc')
-rw-r--r--libs/ardour/async_midi_port.cc38
1 files changed, 0 insertions, 38 deletions
diff --git a/libs/ardour/async_midi_port.cc b/libs/ardour/async_midi_port.cc
index c27a91f006..eee585fd96 100644
--- a/libs/ardour/async_midi_port.cc
+++ b/libs/ardour/async_midi_port.cc
@@ -146,15 +146,6 @@ AsyncMIDIPort::cycle_start (MIDI::pframes_t nframes)
_xthread.wakeup ();
}
- if (inbound_midi_filter) {
- inbound_midi_filter (mb, mb);
- }
-
- if (_shadow_port) {
- if (shadow_midi_filter (mb, _shadow_port->get_midi_buffer (nframes))) {
- _shadow_port->flush_buffers (nframes);
- }
- }
}
}
@@ -351,32 +342,3 @@ AsyncMIDIPort::is_process_thread()
return pthread_equal (pthread_self(), _process_thread);
}
-int
-AsyncMIDIPort::add_shadow_port (string const & name, MidiFilter mf)
-{
- if (!ARDOUR::Port::receives_input()) {
- return -1;
- }
-
- if (_shadow_port) {
- return -2;
- }
-
- shadow_midi_filter = mf;
-
- /* shadow port is not async. */
-
- if (!(_shadow_port = boost::dynamic_pointer_cast<MidiPort> (AudioEngine::instance()->register_output_port (DataType::MIDI, name, false, PortFlags (Shadow|IsTerminal))))) {
- return -3;
- }
-
- /* forward on our port latency to the shadow port.
-
- XXX: need to capture latency changes and forward them too.
- */
-
- LatencyRange latency = private_latency_range (false);
- _shadow_port->set_private_latency_range (latency, false);
-
- return 0;
-}