summaryrefslogtreecommitdiff
path: root/libs/ardour/io.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/io.cc')
-rw-r--r--libs/ardour/io.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc
index d39ba7b4f9..38b5fc717d 100644
--- a/libs/ardour/io.cc
+++ b/libs/ardour/io.cc
@@ -912,7 +912,7 @@ IO::make_connections (const XMLNode& node, int version, bool in)
if (prop) {
boost::shared_ptr<Bundle> b = find_possible_bundle (prop->value());
if (b) {
- connect_ports_to_bundle (b, this);
+ connect_ports_to_bundle (b, true, this);
}
}
@@ -1241,13 +1241,19 @@ IO::latency () const
}
int
-IO::connect_ports_to_bundle (boost::shared_ptr<Bundle> c, void* src)
+IO::connect_ports_to_bundle (boost::shared_ptr<Bundle> c, bool exclusive, void* src)
{
BLOCK_PROCESS_CALLBACK ();
{
Glib::Threads::Mutex::Lock lm2 (io_lock);
+ if (exclusive) {
+ for (PortSet::iterator i = _ports.begin(); i != _ports.end(); ++i) {
+ i->disconnect_all ();
+ }
+ }
+
c->connect (_bundle, _session.engine());
/* If this is a UserBundle, make a note of what we've done */