From 2a2e5a49e7cab1c15f431f5f3ec4863daa58d2ba Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 16 Oct 2022 04:03:21 +0200 Subject: [PATCH] List I/O Plugins separately in connection matrix --- gtk2_ardour/port_group.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gtk2_ardour/port_group.cc b/gtk2_ardour/port_group.cc index 8b6dfb2565..3ba1bed176 100644 --- a/gtk2_ardour/port_group.cc +++ b/gtk2_ardour/port_group.cc @@ -34,6 +34,7 @@ #include "ardour/auditioner.h" #include "ardour/bundle.h" #include "ardour/control_protocol_manager.h" +#include "ardour/io_plug.h" #include "ardour/io_processor.h" #include "ardour/midi_port.h" #include "ardour/midiport_manager.h" @@ -349,6 +350,7 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp boost::shared_ptr bus (new PortGroup (string_compose (_("%1 Busses"), PROGRAM_NAME))); boost::shared_ptr track (new PortGroup (string_compose (_("%1 Tracks"), PROGRAM_NAME))); boost::shared_ptr sidechain (new PortGroup (string_compose (_("%1 Sidechains"), PROGRAM_NAME))); + boost::shared_ptr ioplugin (new PortGroup (string_compose (_("%1 I/O Plugin"), PROGRAM_NAME))); boost::shared_ptr system (new PortGroup (_("Hardware"))); boost::shared_ptr program (new PortGroup (string_compose (_("%1 Misc"), PROGRAM_NAME))); boost::shared_ptr other (new PortGroup (_("Other"))); @@ -562,6 +564,13 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp program->add_bundle (sync); } + for (auto const& iop : *session->io_plugs ()) { + boost::shared_ptr io = inputs ? iop->input() : iop->output(); + if (io->n_ports().get (type) > 0) { + ioplugin->add_bundle (io->bundle(), io); + } + } + /* Now find all other ports that we haven't thought of yet */ std::vector extra_system[DataType::num_types]; @@ -603,6 +612,7 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp !system->has_port(p) && !bus->has_port(p) && !track->has_port(p) + && !ioplugin->has_port(p) && !sidechain->has_port(p) && !program->has_port(p) && !other->has_port(p) @@ -720,6 +730,7 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp add_group_if_not_empty (bus); add_group_if_not_empty (track); add_group_if_not_empty (sidechain); + add_group_if_not_empty (ioplugin); add_group_if_not_empty (program); add_group_if_not_empty (system);