mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
prevent the monitor inputs from showing up in the port matrix, fo'real
git-svn-id: svn://localhost/ardour2/branches/3.0@8235 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
0108d1d900
commit
4a9a5dea26
1 changed files with 22 additions and 1 deletions
|
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
|
#include <boost/algorithm/string.hpp>
|
||||||
|
|
||||||
#include "midi++/manager.h"
|
#include "midi++/manager.h"
|
||||||
#include "midi++/mmc.h"
|
#include "midi++/mmc.h"
|
||||||
|
|
@ -493,6 +494,11 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp
|
||||||
std::vector<std::string> extra_system[DataType::num_types];
|
std::vector<std::string> extra_system[DataType::num_types];
|
||||||
std::vector<std::string> extra_other[DataType::num_types];
|
std::vector<std::string> extra_other[DataType::num_types];
|
||||||
|
|
||||||
|
string lpn (PROGRAM_NAME);
|
||||||
|
boost::to_lower (lpn);
|
||||||
|
string lpnc = lpn;
|
||||||
|
lpnc += ':';
|
||||||
|
|
||||||
const char ** ports = 0;
|
const char ** ports = 0;
|
||||||
if (type == DataType::NIL) {
|
if (type == DataType::NIL) {
|
||||||
ports = session->engine().get_ports ("", "", inputs ? JackPortIsInput : JackPortIsOutput);
|
ports = session->engine().get_ports ("", "", inputs ? JackPortIsInput : JackPortIsOutput);
|
||||||
|
|
@ -524,13 +530,28 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* special hack: ignore our monitor inputs (which show up here because
|
||||||
|
we excluded them earlier.
|
||||||
|
*/
|
||||||
|
|
||||||
|
string lp = p;
|
||||||
|
boost::to_lower (lp);
|
||||||
|
|
||||||
|
if ((lp.find (N_(":monitor")) != string::npos) &&
|
||||||
|
(lp.find (lpn) != string::npos)) {
|
||||||
|
++n;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
/* can't use the audio engine for this as we are looking at non-Ardour ports */
|
/* can't use the audio engine for this as we are looking at non-Ardour ports */
|
||||||
|
|
||||||
jack_port_t* jp = jack_port_by_name (session->engine().jack(), p.c_str());
|
jack_port_t* jp = jack_port_by_name (session->engine().jack(), p.c_str());
|
||||||
if (jp) {
|
if (jp) {
|
||||||
DataType t (jack_port_type (jp));
|
DataType t (jack_port_type (jp));
|
||||||
if (t != DataType::NIL) {
|
if (t != DataType::NIL) {
|
||||||
if (port_has_prefix (p, "system:") || port_has_prefix (p, "alsa_pcm") || port_has_prefix (p, "ardour:")) {
|
if (port_has_prefix (p, N_("system:")) ||
|
||||||
|
port_has_prefix (p, N_("alsa_pcm")) ||
|
||||||
|
port_has_prefix (p, lpnc)) {
|
||||||
extra_system[t].push_back (p);
|
extra_system[t].push_back (p);
|
||||||
} else {
|
} else {
|
||||||
extra_other[t].push_back (p);
|
extra_other[t].push_back (p);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue