10 // --------------------------------------------------------------------------------------------------------
12 static volatile bool term
= false;
14 static void signalHandler(int sig
)
25 // --------------------------------------------------------------------------------------------------------
27 typedef bool (*carla_engine_init_func
)(const char* driverName
, const char* clientName
);
28 typedef void (*carla_engine_idle_func
)(void);
29 typedef bool (*carla_is_engine_running_func
)(void);
30 typedef bool (*carla_engine_close_func
)(void);
31 typedef bool (*carla_add_plugin_func
)(BinaryType btype
, PluginType ptype
,
32 const char* filename
, const char* name
, const char* label
, int64_t uniqueId
,
33 const void* extraPtr
, uint options
);
34 typedef const char* (*carla_get_last_error_func
)(void);
38 void* lib
= dlopen("/home/falktx/FOSS/GIT-mine/falkTX/Carla/bin/libcarla_standalone2.so", RTLD_NOW
|RTLD_GLOBAL
);
42 printf("Failed to load carla lib\n");
46 const carla_engine_init_func carla_engine_init
= dlsym(lib
, "carla_engine_init");
47 const carla_engine_idle_func carla_engine_idle
= dlsym(lib
, "carla_engine_idle");
48 const carla_is_engine_running_func carla_is_engine_running
= dlsym(lib
, "carla_is_engine_running");
49 const carla_engine_close_func carla_engine_close
= dlsym(lib
, "carla_engine_close");
50 const carla_add_plugin_func carla_add_plugin
= dlsym(lib
, "carla_add_plugin");
51 const carla_get_last_error_func carla_get_last_error
= dlsym(lib
, "carla_get_last_error");
53 if (! carla_engine_init("JACK", "Carla-uhe-test"))
55 printf("Engine failed to initialize, possible reasons:\n%s\n", carla_get_last_error());
59 if (! carla_add_plugin(BINARY_NATIVE
, PLUGIN_VST2
, "/home/falktx/.vst/u-he/ACE.64.so", "", "", 0, NULL
, 0))
61 printf("Failed to load plugin, possible reasons:\n%s\n", carla_get_last_error());
66 signal(SIGINT
, signalHandler
);
67 signal(SIGTERM
, signalHandler
);
69 while (carla_is_engine_running() && ! term
)
80 // --------------------------------------------------------------------------------------------------------