clean up bench a little
This commit is contained in:
parent
dfd81b055b
commit
fbea39cfa6
1 changed files with 12 additions and 3 deletions
|
@ -26,12 +26,18 @@ INNER const LADSPA_Descriptor*
|
||||||
load_ladspa(char *path)
|
load_ladspa(char *path)
|
||||||
{
|
{
|
||||||
plug = dlopen(path, RTLD_NOW);
|
plug = dlopen(path, RTLD_NOW);
|
||||||
assert(plug);
|
if (!plug) {
|
||||||
|
puts(dlerror());
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
atexit(cleanup);
|
atexit(cleanup);
|
||||||
|
|
||||||
LADSPA_Descriptor_Function df;
|
LADSPA_Descriptor_Function df;
|
||||||
df = (decltype(df)) dlsym(plug, "ladspa_descriptor");
|
df = (decltype(df)) dlsym(plug, "ladspa_descriptor");
|
||||||
assert(df);
|
if (!df) {
|
||||||
|
puts(dlerror());
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
const LADSPA_Descriptor *d = df(0);
|
const LADSPA_Descriptor *d = df(0);
|
||||||
assert(d);
|
assert(d);
|
||||||
|
@ -88,7 +94,10 @@ get_default(LADSPA_PortRangeHint hint)
|
||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
assert(argc > 1);
|
if (argc < 2) {
|
||||||
|
fprintf(stderr, "Please supply a path to the plugin to test.\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
const LADSPA_Descriptor *d = load_ladspa(argv[1]);
|
const LADSPA_Descriptor *d = load_ladspa(argv[1]);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue