summaryrefslogtreecommitdiff
path: root/gtk2_ardour/io_selector.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-11-27 16:44:51 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-11-27 16:44:51 +0000
commit28791ac5e6c96f6bace1587557409b3b12cf5b23 (patch)
treedb57c9d29401403a11a8a874d61d5c3dbe13b0ab /gtk2_ardour/io_selector.cc
parent27cf00a5988345e177e1c57b133848754c1ae20d (diff)
better fix for IOSelector::set_state()'s need to hold the process lock
git-svn-id: svn://localhost/ardour2/branches/3.0@8107 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/io_selector.cc')
-rw-r--r--gtk2_ardour/io_selector.cc15
1 files changed, 6 insertions, 9 deletions
diff --git a/gtk2_ardour/io_selector.cc b/gtk2_ardour/io_selector.cc
index 8677d85e47..d440e1397b 100644
--- a/gtk2_ardour/io_selector.cc
+++ b/gtk2_ardour/io_selector.cc
@@ -136,23 +136,20 @@ 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) {
- Port* f = _session->engine().get_port_by_name (*i);
+ Port* f = _session->engine().get_port_by_name_locked (*i);
if (!f) {
return;
}
- {
- Glib::Mutex::Lock lm (AudioEngine::instance()->process_lock());
-
- if (s) {
- _io->connect (f, *j, 0);
- } else {
- _io->disconnect (f, *j, 0);
- }
+ if (s) {
+ _io->connect (f, *j, 0);
+ } else {
+ _io->disconnect (f, *j, 0);
}
}
}