Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Allow to use files instead of lv2 plugins
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Feb 1, 2021
1 parent 79c2740 commit 90b9a4f
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/kuriborosu.c
Expand Up @@ -236,8 +236,20 @@ int main(int argc, char* argv[])

for (int i = 3; i < argc; ++i)
{
if (! carla_add_plugin(hhandle, BINARY_NATIVE, PLUGIN_LV2, "", "", argv[i], 0, NULL, 0x0))
fprintf(stderr, "Failed to load plugin %s, error was: %s\n", argv[i], carla_get_last_error(hhandle));
const char* const plugin_arg = argv[i];


// check if file
if (plugin_arg[0] == '.' || plugin_arg[0] == '/')
{
if (! carla_load_file(hhandle, plugin_arg))
fprintf(stderr, "Failed to load file %s, error was: %s\n", plugin_arg, carla_get_last_error(hhandle));
}
else
{
if (! carla_add_plugin(hhandle, BINARY_NATIVE, PLUGIN_LV2, "", "", plugin_arg, 0, NULL, 0x0))
fprintf(stderr, "Failed to load plugin %s, error was: %s\n", plugin_arg, carla_get_last_error(hhandle));
}
}

SF_INFO sf_fmt = {
Expand Down

0 comments on commit 90b9a4f

Please sign in to comment.