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);
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);
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);