summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/ardour/ardour/io.h7
-rw-r--r--libs/ardour/io.cc1
-rw-r--r--libs/ardour/route.cc4
-rw-r--r--libs/ardour/session.cc3
4 files changed, 10 insertions, 5 deletions
diff --git a/libs/ardour/ardour/io.h b/libs/ardour/ardour/io.h
index fd7cb563fd..94dbfadb04 100644
--- a/libs/ardour/ardour/io.h
+++ b/libs/ardour/ardour/io.h
@@ -133,8 +133,11 @@ class IO : public SessionObject, public Latent
const ChanCount& n_ports () const { return _ports.count(); }
- /** Emitted with the process lock held */
- PBD::Signal2<void,IOChange,void*> changed;
+ /* The process lock will be held on emission of this signal if
+ * IOChange contains ConfigurationChanged. In other cases,
+ * the process lock status is undefined.
+ */
+ PBD::Signal2<void, IOChange, void *> changed;
virtual XMLNode& state (bool full);
XMLNode& get_state (void);
diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc
index c29ee51a58..ced4508d7a 100644
--- a/libs/ardour/io.cc
+++ b/libs/ardour/io.cc
@@ -189,7 +189,6 @@ IO::disconnect (Port* our_port, string other_port, void* src)
return 0;
}
-/** Caller must hold process lock */
int
IO::connect (Port* our_port, string other_port, void* src)
{
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 55b3a59f51..51ea1960cb 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -2718,7 +2718,7 @@ Route::nonrealtime_handle_transport_stopped (bool /*abort_ignored*/, bool did_lo
_roll_delay = _initial_delay;
}
-/** Called with the process lock held */
+/** Called with the process lock held if change contains ConfigurationChanged */
void
Route::input_change_handler (IOChange change, void * /*src*/)
{
@@ -2729,7 +2729,7 @@ Route::input_change_handler (IOChange change, void * /*src*/)
}
}
-/** Called with the process lock held */
+/** Called with the process lock held if change contains ConfigurationChanged */
void
Route::output_change_handler (IOChange change, void * /*src*/)
{
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 11fd1fc635..c80f9c3e2e 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -1933,6 +1933,9 @@ Session::new_route_from_template (uint32_t how_many, const std::string& template
picks up the configuration of the route. During session
loading this normally happens in a different way.
*/
+
+ Glib::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
+
IOChange change (IOChange::Type (IOChange::ConfigurationChanged | IOChange::ConnectionsChanged));
change.after = route->input()->n_ports();
route->input()->changed (change, this);