summaryrefslogtreecommitdiff
path: root/libs/ardour/auditioner.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-11-25 23:46:24 +0000
committerCarl Hetherington <carl@carlh.net>2010-11-25 23:46:24 +0000
commit54cbc45a5a40f4eefd64fa41ad9029f5f8f6a84f (patch)
tree558e7cb27683030787fcb4d5654bd4b58ebd8e21 /libs/ardour/auditioner.cc
parent28c004f4fb0750b6a4236552bcc8de4946b9b164 (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/auditioner.cc')
-rw-r--r--libs/ardour/auditioner.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/libs/ardour/auditioner.cc b/libs/ardour/auditioner.cc
index baf97292ec..37df6297da 100644
--- a/libs/ardour/auditioner.cc
+++ b/libs/ardour/auditioner.cc
@@ -176,11 +176,15 @@ Auditioner::audition_region (boost::shared_ptr<Region> region)
}
ProcessorStreams ps;
- if (configure_processors (&ps)) {
- error << string_compose (_("Cannot setup auditioner processing flow for %1 channels"),
- _diskstream->n_channels()) << endmsg;
- return;
- }
+ {
+ Glib::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
+
+ if (configure_processors (&ps)) {
+ error << string_compose (_("Cannot setup auditioner processing flow for %1 channels"),
+ _diskstream->n_channels()) << endmsg;
+ return;
+ }
+ }
/* force a panner reset now that we have all channels */