List I/O Plugins separately in connection matrix

This commit is contained in:
Robin Gareus 2022-10-16 04:03:21 +02:00
parent 18527e4056
commit 2a2e5a49e7
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -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<PortGroup> bus (new PortGroup (string_compose (_("%1 Busses"), PROGRAM_NAME)));
boost::shared_ptr<PortGroup> track (new PortGroup (string_compose (_("%1 Tracks"), PROGRAM_NAME)));
boost::shared_ptr<PortGroup> sidechain (new PortGroup (string_compose (_("%1 Sidechains"), PROGRAM_NAME)));
boost::shared_ptr<PortGroup> ioplugin (new PortGroup (string_compose (_("%1 I/O Plugin"), PROGRAM_NAME)));
boost::shared_ptr<PortGroup> system (new PortGroup (_("Hardware")));
boost::shared_ptr<PortGroup> program (new PortGroup (string_compose (_("%1 Misc"), PROGRAM_NAME)));
boost::shared_ptr<PortGroup> 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> 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<std::string> 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);