summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-12-01 02:36:31 +0000
committerCarl Hetherington <carl@carlh.net>2009-12-01 02:36:31 +0000
commit4ee4be1550f24cc2328a205e04a55b970c1d57e0 (patch)
tree96902a8f22389a53a69f9fedc37846a1e77de2b0 /libs
parente374518ca9c4643874eee3877e270eef32d95f18 (diff)
Revert completely mystifying stupidity in a previous patch of mine, and (properly) fix crashes when drag-and-drop of plugins fails because of impossible configurations.
git-svn-id: svn://localhost/ardour2/branches/3.0@6237 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/route.cc16
1 files changed, 2 insertions, 14 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index d57f542bc4..6879eee5e5 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -985,8 +985,6 @@ Route::add_processors (const ProcessorList& others, ProcessorList::iterator iter
{
Glib::RWLock::WriterLock lm (_processor_lock);
- ProcessorList::iterator existing_end = _processors.end();
- --existing_end;
ChanCount potential_max_streams = ChanCount::max (_input->n_ports(), _output->n_ports());
@@ -1012,15 +1010,14 @@ Route::add_processors (const ProcessorList& others, ProcessorList::iterator iter
}
}
- _processors.insert (iter, *i);
+ ProcessorList::iterator inserted = _processors.insert (iter, *i);
if ((*i)->active()) {
(*i)->activate ();
}
if (configure_processors_unlocked (err)) {
- ++existing_end;
- _processors.erase (existing_end, _processors.end());
+ _processors.erase (inserted);
configure_processors_unlocked (0); // it worked before we tried to add it ...
return -1;
}
@@ -1473,15 +1470,6 @@ Route::configure_processors_unlocked (ProcessorStreams* err)
}
}
- /* Take the process lock so that if we add a processor which increases the required
- number of scratch buffers, we create those scratch buffers before the process
- thread has a chance to ask for them.
- XXX: in an ideal world we'd perhaps use some RCU magic to avoid having to take
- the lock here.
- */
-
- Glib::Mutex::Lock pl (_session.engine().process_lock ());
-
// We can, so configure everything
list< pair<ChanCount,ChanCount> >::iterator c = configuration.begin();
for (ProcessorList::iterator p = _processors.begin(); p != _processors.end(); ++p, ++c) {