Bundle::PortList const & in_ports = c[IN].bundle->channel_ports (c[IN].channel);
Bundle::PortList const & out_ports = c[OUT].bundle->channel_ports (c[OUT].channel);
- Glib::Mutex::Lock lm (AudioEngine::instance()->process_lock());
-
for (Bundle::PortList::const_iterator i = in_ports.begin(); i != in_ports.end(); ++i) {
for (Bundle::PortList::const_iterator j = out_ports.begin(); j != out_ports.end(); ++j) {
- Port* p = _session->engine().get_port_by_name_locked (*i);
- Port* q = _session->engine().get_port_by_name_locked (*j);
+ boost::shared_ptr<Port> p = _session->engine().get_port_by_name (*i);
+ boost::shared_ptr<Port> q = _session->engine().get_port_by_name (*j);
if (p) {
if (s) {
if (_session == 0) {
return PortMatrixNode::NOT_ASSOCIATED;
}
-
+
+ if (c[0].bundle->nchannels() == ChanCount::ZERO || c[1].bundle->nchannels() == ChanCount::ZERO) {
+ return PortMatrixNode::NOT_ASSOCIATED;
+ }
+
Bundle::PortList const & in_ports = c[IN].bundle->channel_ports (c[IN].channel);
Bundle::PortList const & out_ports = c[OUT].bundle->channel_ports (c[OUT].channel);
if (in_ports.empty() || out_ports.empty()) {
for (Bundle::PortList::const_iterator i = in_ports.begin(); i != in_ports.end(); ++i) {
for (Bundle::PortList::const_iterator j = out_ports.begin(); j != out_ports.end(); ++j) {
- Port* p = _session->engine().get_port_by_name (*i);
- Port* q = _session->engine().get_port_by_name (*j);
+ boost::shared_ptr<Port> p = _session->engine().get_port_by_name (*i);
+ boost::shared_ptr<Port> q = _session->engine().get_port_by_name (*j);
if (!p && !q) {
/* two non-Ardour ports; things are slightly more involved */
if (jp == 0) {
return PortMatrixNode::NOT_ASSOCIATED;
}
-
+
char const ** c = jack_port_get_all_connections (jack, jp);
char const ** p = c;
-
+
while (p && *p != 0) {
if (strcmp (*p, j->c_str()) == 0) {
free (c);
}
GlobalPortMatrixWindow::GlobalPortMatrixWindow (Session* s, DataType t)
- : _port_matrix (this, s, t)
+ : ArdourWindow (X_("reset me soon"))
+ , _port_matrix (this, s, t)
{
switch (t) {
case DataType::AUDIO:
{
return _("port");
}
-
+