aboutsummaryrefslogtreecommitdiffstats
path: root/src/jalv.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-12-23 02:42:33 +0000
committerDavid Robillard <d@drobilla.net>2011-12-23 02:42:33 +0000
commite36a95bd35301c5343e593ef385f8b7573d9d606 (patch)
tree7f5d2243a970b4c85ca33ff0075259ba5e41d304 /src/jalv.c
parentbc8783a4b754296178da50805b275abcf5ff5738 (diff)
downloadjalv-e36a95bd35301c5343e593ef385f8b7573d9d606.tar.gz
jalv-e36a95bd35301c5343e593ef385f8b7573d9d606.tar.bz2
jalv-e36a95bd35301c5343e593ef385f8b7573d9d606.zip
Use new LilvState API for state/presets.
git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@3900 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/jalv.c')
-rw-r--r--src/jalv.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/jalv.c b/src/jalv.c
index 452094b..2bd6266 100644
--- a/src/jalv.c
+++ b/src/jalv.c
@@ -56,7 +56,7 @@ map_uri(LV2_URID_Map_Handle handle,
{
//return symap_map(((Jalv*)handle)->symap, uri);
const LV2_URID id = symap_map(((Jalv*)handle)->symap, uri);
- printf("MAP %s => %u\n", uri, id);
+ //printf("MAP %s => %u\n", uri, id);
return id;
}
@@ -77,7 +77,7 @@ uri_to_id(LV2_URI_Map_Callback_Data callback_data,
{
//return symap_map(((Jalv*)callback_data)->symap, uri);
const LV2_URID id = symap_map(((Jalv*)callback_data)->symap, uri);
- printf("MAP %s => %u\n", uri, id);
+ //printf("MAP %s => %u\n", uri, id);
return id;
}
@@ -563,15 +563,17 @@ main(int argc, char** argv)
"connectionOptional");
/* Get plugin URI from loaded state or command line */
- PluginState* state = NULL;
- LilvNode* plugin_uri = NULL;
+ LilvState* state = NULL;
+ LilvNode* plugin_uri = NULL;
if (host.opts.load) {
- state = jalv_load_state(&host, host.opts.load);
+ char* path = jalv_strjoin(host.opts.load, "/state.ttl");
+ state = lilv_state_new_from_file(host.world, &host.map, NULL, path);
+ free(path);
if (!state) {
fprintf(stderr, "Failed to load state from %s\n", host.opts.load);
return EXIT_FAILURE;
}
- plugin_uri = lilv_node_duplicate(plugin_state_get_plugin_uri(state));
+ plugin_uri = lilv_node_duplicate(lilv_state_get_plugin_uri(state));
} else if (argc > 1) {
plugin_uri = lilv_new_uri(world, argv[1]);
} else {