From a01b27f37950988ebead4c7a1e96dcbee45f0d24 Mon Sep 17 00:00:00 2001 From: carlh Date: Mon, 21 Jun 2010 23:45:30 +0000 Subject: [PATCH] Stop attempts to connect new MIDI tracks to bad ports when there is no MIDI IOs on the master buss. git-svn-id: svn+ssh://ardour.org/ardour2/branches/3.0@7287 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/session.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 48d2f698..3d5430d2 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -1541,9 +1541,6 @@ Session::auto_connect_route (boost::shared_ptr route, ? ChanCount::max(existing_inputs, existing_outputs) : existing_outputs; - static string empty_string; - string& port = empty_string; - for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) { vector physinputs; vector physoutputs; @@ -1554,7 +1551,7 @@ Session::auto_connect_route (boost::shared_ptr route, if (!physinputs.empty()) { uint32_t nphysical_in = physinputs.size(); for (uint32_t i = 0; i < route->n_inputs().get(*t) && i < nphysical_in; ++i) { - port = empty_string; + string port; if (Config->get_input_auto_connect() & AutoConnectPhysical) { port = physinputs[(in_offset.get(*t) + i) % nphysical_in]; @@ -1570,7 +1567,7 @@ Session::auto_connect_route (boost::shared_ptr route, if (!physoutputs.empty()) { uint32_t nphysical_out = physoutputs.size(); for (uint32_t i = 0; i < route->n_outputs().get(*t); ++i) { - port = empty_string; + string port; if (Config->get_output_auto_connect() & AutoConnectPhysical) { port = physoutputs[(out_offset.get(*t) + i) % nphysical_out]; -- 2.11.4.GIT