NO-OP: whitespace
[ardour.git] / libs / ardour / lv2_plugin.cc
index c4a1e0c24fe241ae777b76cbaa157401adb4972d..974ed87c2d9f7bd925d028fed43d39d6bd077088 100644 (file)
@@ -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);
@@ -2543,7 +2553,7 @@ write_position(LV2_Atom_Forge*     forge,
        LV2_Atom_Forge_Frame sample;
 #ifdef HAVE_LV2_1_10_0
        lv2_atom_forge_object(forge, &sample, 0, urids.time_Position);
-       lv2_atom_forge_key(forge, urids.time_sample);
+       lv2_atom_forge_key(forge, urids.time_frame);
        lv2_atom_forge_long(forge, position);
        lv2_atom_forge_key(forge, urids.time_speed);
        lv2_atom_forge_float(forge, speed);
@@ -2560,7 +2570,7 @@ write_position(LV2_Atom_Forge*     forge,
        lv2_atom_forge_float(forge, bpm);
 #else
        lv2_atom_forge_blank(forge, &sample, 1, urids.time_Position);
-       lv2_atom_forge_property_head(forge, urids.time_sample, 0);
+       lv2_atom_forge_property_head(forge, urids.time_frame, 0);
        lv2_atom_forge_long(forge, position);
        lv2_atom_forge_property_head(forge, urids.time_speed, 0);
        lv2_atom_forge_float(forge, speed);