diff options
author | Carl Hetherington <carl@carlh.net> | 2010-11-25 23:46:24 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-11-25 23:46:24 +0000 |
commit | 54cbc45a5a40f4eefd64fa41ad9029f5f8f6a84f (patch) | |
tree | 558e7cb27683030787fcb4d5654bd4b58ebd8e21 /libs/ardour/port_insert.cc | |
parent | 28c004f4fb0750b6a4236552bcc8de4946b9b164 (diff) |
Prevent removal of route inputs when the plugins cannot be configured with the new number. Rework locking so that the process lock is held from the point that a route input is removed until after the processors are reconfigured; fixes #3548.
git-svn-id: svn://localhost/ardour2/branches/3.0@8089 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/port_insert.cc')
-rw-r--r-- | libs/ardour/port_insert.cc | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/libs/ardour/port_insert.cc b/libs/ardour/port_insert.cc index 20c6b127d2..4854c08d8b 100644 --- a/libs/ardour/port_insert.cc +++ b/libs/ardour/port_insert.cc @@ -244,17 +244,22 @@ PortInsert::signal_latency() const } } +/** Caller must not hold process lock */ bool PortInsert::configure_io (ChanCount in, ChanCount out) { /* for an insert, processor input corresponds to IO output, and vice versa */ - if (_input->ensure_io (in, false, this) != 0) { - return false; - } - - if (_output->ensure_io (out, false, this) != 0) { - return false; + { + Glib::Mutex::Lock lm (AudioEngine::instance()->process_lock ()); + + if (_input->ensure_io (in, false, this) != 0) { + return false; + } + + if (_output->ensure_io (out, false, this) != 0) { + return false; + } } return Processor::configure_io (in, out); |