mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
Support saving LV2 presets multiple times (fix #0005949).
This commit is contained in:
parent
e3cf23b8a0
commit
9869e2704a
2 changed files with 9 additions and 3 deletions
|
|
@ -407,7 +407,7 @@ LV2Plugin::init(const void* c_plugin, framecnt_t rate)
|
||||||
throw failed_constructor();
|
throw failed_constructor();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_NEW_LILV
|
#ifdef HAVE_LILV_0_16_0
|
||||||
// Load default state
|
// Load default state
|
||||||
LilvState* state = lilv_state_new_from_world(
|
LilvState* state = lilv_state_new_from_world(
|
||||||
_world.world, _uri_map.urid_map(), lilv_plugin_get_uri(_impl->plugin));
|
_world.world, _uri_map.urid_map(), lilv_plugin_get_uri(_impl->plugin));
|
||||||
|
|
@ -1077,6 +1077,10 @@ LV2Plugin::do_save_preset(string name)
|
||||||
std::string uri = Glib::filename_to_uri(Glib::build_filename(bundle, file_name));
|
std::string uri = Glib::filename_to_uri(Glib::build_filename(bundle, file_name));
|
||||||
LilvNode *node_bundle = lilv_new_uri(_world.world, Glib::filename_to_uri(Glib::build_filename(bundle, "/")).c_str());
|
LilvNode *node_bundle = lilv_new_uri(_world.world, Glib::filename_to_uri(Glib::build_filename(bundle, "/")).c_str());
|
||||||
LilvNode *node_preset = lilv_new_uri(_world.world, uri.c_str());
|
LilvNode *node_preset = lilv_new_uri(_world.world, uri.c_str());
|
||||||
|
#ifdef HAVE_LILV_0_19_2
|
||||||
|
lilv_world_unload_resource(_world.world, node_preset);
|
||||||
|
lilv_world_unload_bundle(_world.world, node_bundle);
|
||||||
|
#endif
|
||||||
lilv_world_load_bundle(_world.world, node_bundle);
|
lilv_world_load_bundle(_world.world, node_bundle);
|
||||||
lilv_world_load_resource(_world.world, node_preset);
|
lilv_world_load_resource(_world.world, node_preset);
|
||||||
lilv_node_free(node_bundle);
|
lilv_node_free(node_bundle);
|
||||||
|
|
|
||||||
|
|
@ -275,8 +275,10 @@ def configure(conf):
|
||||||
atleast_version='0.2.0', mandatory=True)
|
atleast_version='0.2.0', mandatory=True)
|
||||||
autowaf.check_pkg(conf, 'lilv-0', uselib_store='LILV',
|
autowaf.check_pkg(conf, 'lilv-0', uselib_store='LILV',
|
||||||
atleast_version='0.14.0', mandatory=True)
|
atleast_version='0.14.0', mandatory=True)
|
||||||
autowaf.check_pkg(conf, 'lilv-0', uselib_store='NEW_LILV',
|
autowaf.check_pkg(conf, 'lilv-0', uselib_store='LILV_0_16_0',
|
||||||
atleast_version='0.15.0', mandatory=False)
|
atleast_version='0.16.0', mandatory=False)
|
||||||
|
autowaf.check_pkg(conf, 'lilv-0', uselib_store='LILV_0_19_2',
|
||||||
|
atleast_version='0.19.2', mandatory=False)
|
||||||
autowaf.check_pkg(conf, 'suil-0', uselib_store='SUIL',
|
autowaf.check_pkg(conf, 'suil-0', uselib_store='SUIL',
|
||||||
atleast_version='0.6.0', mandatory=False)
|
atleast_version='0.6.0', mandatory=False)
|
||||||
conf.define ('LV2_SUPPORT', 1)
|
conf.define ('LV2_SUPPORT', 1)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue