diff options
Diffstat (limited to 'src/plugininstance.c')
-rw-r--r-- | src/plugininstance.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/plugininstance.c b/src/plugininstance.c index c3e0601..365535b 100644 --- a/src/plugininstance.c +++ b/src/plugininstance.c @@ -1,6 +1,6 @@ /* SLV2 * Copyright (C) 2007 Dave Robillard <http://drobilla.net> - * + * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) @@ -37,19 +37,19 @@ slv2_plugin_instantiate(SLV2Plugin plugin, const LV2_Feature*const* features) { struct _Instance* result = NULL; - + const LV2_Feature** local_features = NULL; if (features == NULL) { local_features = malloc(sizeof(LV2_Feature)); local_features[0] = NULL; } - + const char* const lib_uri = slv2_value_as_uri(slv2_plugin_get_library_uri(plugin)); const char* const lib_path = slv2_uri_to_path(lib_uri); - + if (!lib_path) return NULL; - + dlerror(); void* lib = dlopen(lib_path, RTLD_NOW); if (!lib) { @@ -66,24 +66,24 @@ slv2_plugin_instantiate(SLV2Plugin plugin, return NULL; } else { // Search for plugin by URI - + // FIXME: Kludge to get bundle path (containing directory of binary) const char* bundle_path = slv2_uri_to_path(slv2_value_as_uri( slv2_plugin_get_bundle_uri(plugin))); //printf("Bundle path: %s\n", bundle_path); - + for (uint32_t i=0; 1; ++i) { - + const LV2_Descriptor* ld = df(i); - + if (!ld) { fprintf(stderr, "Did not find plugin %s in %s\n", slv2_value_as_uri(slv2_plugin_get_uri(plugin)), lib_path); dlclose(lib); break; // return NULL } else if (!strcmp(ld->URI, slv2_value_as_uri(slv2_plugin_get_uri(plugin)))) { - + assert(plugin->plugin_uri); //printf("Found %s at index %u in:\n\t%s\n\n", |