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/session_state.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/session_state.cc')
-rw-r--r-- | libs/ardour/session_state.cc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 6ceeeb599c..9f87c77009 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -510,6 +510,7 @@ Session::ensure_subdirs () return 0; } +/** Caller must not hold process lock */ int Session::create (const string& mix_template, BusProfile* bus_profile) { @@ -578,8 +579,11 @@ Session::create (const string& mix_template, BusProfile* bus_profile) } boost_debug_shared_ptr_mark_interesting (rt, "Route"); boost::shared_ptr<Route> r (rt); - r->input()->ensure_io (count, false, this); - r->output()->ensure_io (count, false, this); + { + Glib::Mutex::Lock lm (AudioEngine::instance()->process_lock ()); + r->input()->ensure_io (count, false, this); + r->output()->ensure_io (count, false, this); + } r->set_remote_control_id (control_id++); rl.push_back (r); @@ -592,8 +596,11 @@ Session::create (const string& mix_template, BusProfile* bus_profile) } boost_debug_shared_ptr_mark_interesting (rt, "Route"); boost::shared_ptr<Route> r (rt); - r->input()->ensure_io (count, false, this); - r->output()->ensure_io (count, false, this); + { + Glib::Mutex::Lock lm (AudioEngine::instance()->process_lock ()); + r->input()->ensure_io (count, false, this); + r->output()->ensure_io (count, false, this); + } r->set_remote_control_id (control_id); rl.push_back (r); |