summaryrefslogtreecommitdiff
path: root/libs/ardour/route.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-05-26 15:05:06 +0200
committerRobin Gareus <robin@gareus.org>2016-05-26 15:05:06 +0200
commit00967a19829cc6aab30eefecdd1deef29c7c9d33 (patch)
tree9c04b4cea7094e9e78148f39129755f4f42b27b9 /libs/ardour/route.cc
parenteadc2ca88a754ac5e7ba960b2db4c01cc40d887a (diff)
take read-lock when saving processor order
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r--libs/ardour/route.cc35
1 files changed, 19 insertions, 16 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 3442d0ec8a..6cd593d5ad 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -2781,26 +2781,29 @@ Route::state(bool full_state)
node->add_child_nocopy (_pannable->state (full_state));
}
- for (i = _processors.begin(); i != _processors.end(); ++i) {
- if (!full_state) {
- /* template save: do not include internal sends functioning as
- aux sends because the chance of the target ID
- in the session where this template is used
- is not very likely.
-
- similarly, do not save listen sends which connect to
- the monitor section, because these will always be
- added if necessary.
- */
- boost::shared_ptr<InternalSend> is;
+ {
+ Glib::Threads::RWLock::ReaderLock lm (_processor_lock);
+ for (i = _processors.begin(); i != _processors.end(); ++i) {
+ if (!full_state) {
+ /* template save: do not include internal sends functioning as
+ aux sends because the chance of the target ID
+ in the session where this template is used
+ is not very likely.
+
+ similarly, do not save listen sends which connect to
+ the monitor section, because these will always be
+ added if necessary.
+ */
+ boost::shared_ptr<InternalSend> is;
- if ((is = boost::dynamic_pointer_cast<InternalSend> (*i)) != 0) {
- if (is->role() == Delivery::Listen) {
- continue;
+ if ((is = boost::dynamic_pointer_cast<InternalSend> (*i)) != 0) {
+ if (is->role() == Delivery::Listen) {
+ continue;
+ }
}
}
+ node->add_child_nocopy((*i)->state (full_state));
}
- node->add_child_nocopy((*i)->state (full_state));
}
if (_extra_xml) {