diff options
author | Robin Gareus <robin@gareus.org> | 2019-10-18 15:17:54 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-10-18 22:56:46 +0200 |
commit | f0d2327af09447c237dadb26e48923ca2129b863 (patch) | |
tree | f43df5bf5cd9840004ab05db68d24214d6f81e49 /gtk2_ardour/port_group.cc | |
parent | eade673771c8c57918c23b305317179bd5d6eed3 (diff) |
Use AsyncMIDIPort API
Diffstat (limited to 'gtk2_ardour/port_group.cc')
-rw-r--r-- | gtk2_ardour/port_group.cc | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/gtk2_ardour/port_group.cc b/gtk2_ardour/port_group.cc index ca3a73643b..ab7feb6185 100644 --- a/gtk2_ardour/port_group.cc +++ b/gtk2_ardour/port_group.cc @@ -26,6 +26,7 @@ #include "midi++/mmc.h" +#include "ardour/async_midi_port.h" #include "ardour/audioengine.h" #include "ardour/auditioner.h" #include "ardour/bundle.h" @@ -490,15 +491,12 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp } /* virtual keyboard */ - if ((type == DataType::MIDI || type == DataType::NIL)) { + if (!inputs && (type == DataType::MIDI || type == DataType::NIL)) { + boost::shared_ptr<ARDOUR::Port> ap = boost::dynamic_pointer_cast<ARDOUR::Port> (session->vkbd_output_port()); AudioEngine* ae = AudioEngine::instance(); - if (!inputs) { - boost::shared_ptr<Bundle> vm (new Bundle (_("Virtual MIDI"), inputs)); - vm->add_channel ( - _("Virtual Keyboard"), DataType::MIDI, ae->make_port_name_non_relative (session->vkbd_output_port()->name()) - ); - program->add_bundle (vm); - } + boost::shared_ptr<Bundle> vm (new Bundle (_("Virtual MIDI"), inputs)); + vm->add_channel (_("Virtual Keyboard"), DataType::MIDI, ae->make_port_name_non_relative (ap->name())); + program->add_bundle (vm); } /* our sync ports */ |