add two process lock calls where some port connecting occurs
authorPaul Davis <paul@linuxaudiosystems.com>
Fri, 26 Nov 2010 18:28:42 +0000 (18:28 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Fri, 26 Nov 2010 18:28:42 +0000 (18:28 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@8092 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/io_selector.cc
libs/ardour/session.cc

index 30c581367dbb82a65054dccbde8e3c83d6282756..f3bc947355f80e5e5f71b705ee4c6a9063ac4a93 100644 (file)
@@ -136,6 +136,8 @@ IOSelector::set_state (ARDOUR::BundleChannel c[2], bool s)
        ARDOUR::Bundle::PortList const & our_ports = c[_ours].bundle->channel_ports (c[_ours].channel);
        ARDOUR::Bundle::PortList const & other_ports = c[_other].bundle->channel_ports (c[_other].channel);
 
+        Glib::Mutex::Lock lm (AudioEngine::instance()->process_lock());
+
        for (ARDOUR::Bundle::PortList::const_iterator i = our_ports.begin(); i != our_ports.end(); ++i) {
                for (ARDOUR::Bundle::PortList::const_iterator j = other_ports.begin(); j != other_ports.end(); ++j) {
 
index 06fd2ec41d61c0807d5e3322ae47a3b74feeded6..5457f514e4d1b518b4aa88fbb4323b91eeea2b71 100644 (file)
@@ -548,6 +548,8 @@ Session::when_engine_running ()
 
        if (_is_new && !no_auto_connect()) {
 
+                Glib::Mutex::Lock lm (AudioEngine::instance()->process_lock());
+                
                 /* don't connect the master bus outputs if there is a monitor bus */
 
                if (_master_out && Config->get_auto_connect_standard_busses() && !_monitor_out) {