summaryrefslogtreecommitdiff
path: root/libs/ardour/lv2_plugin.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/lv2_plugin.cc')
-rw-r--r--libs/ardour/lv2_plugin.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc
index c4a1e0c24f..2b45e9e28a 100644
--- a/libs/ardour/lv2_plugin.cc
+++ b/libs/ardour/lv2_plugin.cc
@@ -2197,7 +2197,17 @@ LV2Plugin::set_state(const XMLNode& node, int version)
set_state_dir ("");
}
- latency_compute_run();
+ /* Do not call latency_compute_run() concurrently with connect_and_run().
+ * So far this can only guarnteed when the session is loading,
+ * and the plugin has not been added to the processor chain.
+ *
+ * Ideally this would clso be called when copying a plugin from another track,
+ * but NOT when copying the state from a plugin to another (active) plugin
+ * instance.
+ */
+ if (_session.loading ()) {
+ latency_compute_run();
+ }
#endif
return Plugin::set_state(node, version);