summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/ladspa.h38
-rw-r--r--utils/ladspa2lv2.c44
-rw-r--r--utils/lv2_inspect.c30
-rw-r--r--utils/lv2_list.c4
4 files changed, 58 insertions, 58 deletions
diff --git a/utils/ladspa.h b/utils/ladspa.h
index 5c30a8a..b1a9c4e 100644
--- a/utils/ladspa.h
+++ b/utils/ladspa.h
@@ -3,17 +3,17 @@
Linux Audio Developer's Simple Plugin API Version 1.1[LGPL].
Copyright (C) 2000-2002 Richard W.E. Furse, Paul Barton-Davis,
Stefan Westerfeld.
-
+
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 2.1 of
the License, or (at your option) any later version.
-
+
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
-
+
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
@@ -32,7 +32,7 @@ extern "C" {
/*****************************************************************************/
-/* Overview:
+/* Overview:
There is a large number of synthesis packages in use or development
on the Linux platform at this time. This API (`The Linux Audio
@@ -76,7 +76,7 @@ extern "C" {
/* Fundamental data type passed in and out of plugin. This data type
is used to communicate audio samples and control values. It is
assumed that the plugin will work sensibly given any numeric input
- value although it may have a preferred range (see hints below).
+ value although it may have a preferred range (see hints below).
For audio it is generally assumed that 1.0f is the `0dB' reference
amplitude and is a `normal' signal level. */
@@ -85,8 +85,8 @@ typedef float LADSPA_Data;
/*****************************************************************************/
-/* Special Plugin Properties:
-
+/* Special Plugin Properties:
+
Optional features of the plugin type are encapsulated in the
LADSPA_Properties type. This is assembled by ORing individual
properties together. */
@@ -122,7 +122,7 @@ typedef int LADSPA_Properties;
(3) The plugin will not access files, devices, pipes, sockets, IPC
or any other mechanism that might result in process or thread
blocking.
-
+
(4) The plugin will take an amount of time to execute a run() or
run_adding() call approximately of form (A+B*SampleCount) where A
and B depend on the machine and host in use. This amount of time
@@ -137,7 +137,7 @@ typedef int LADSPA_Properties;
/*****************************************************************************/
-/* Plugin Ports:
+/* Plugin Ports:
Plugins have `ports' that are inputs or outputs for audio or
data. Ports can communicate arrays of LADSPA_Data (for audio
@@ -172,23 +172,23 @@ typedef int LADSPA_PortDescriptor;
/*****************************************************************************/
-/* Plugin Port Range Hints:
+/* Plugin Port Range Hints:
The host may wish to provide a representation of data entering or
leaving a plugin (e.g. to generate a GUI automatically). To make
this more meaningful, the plugin should provide `hints' to the host
describing the usual values taken by the data.
-
+
Note that these are only hints. The host may ignore them and the
plugin must not assume that data supplied to it is meaningful. If
the plugin receives invalid input data it is expected to continue
to run without failure and, where possible, produce a sensible
output (e.g. a high-pass filter given a negative cutoff frequency
might switch to an all-pass mode).
-
+
Hints are meaningful for all input and output ports but hints for
input control ports are expected to be particularly useful.
-
+
More hint information is encapsulated in the
LADSPA_PortRangeHintDescriptor type which is assembled by ORing
individual hint types together. Hints may require further
@@ -353,7 +353,7 @@ typedef struct _LADSPA_PortRangeHint {
/*****************************************************************************/
-/* Plugin Handles:
+/* Plugin Handles:
This plugin handle indicates a particular instance of the plugin
concerned. It is valid to compare this to NULL (0 for C++) but
@@ -364,13 +364,13 @@ typedef void * LADSPA_Handle;
/*****************************************************************************/
-/* Descriptor for a Type of Plugin:
+/* Descriptor for a Type of Plugin:
This structure is used to describe a plugin type. It provides a
number of functions to examine the type, instantiate it, link it to
buffers and workspaces and to run it. */
-typedef struct _LADSPA_Descriptor {
+typedef struct _LADSPA_Descriptor {
/* This numeric identifier indicates the plugin type
uniquely. Plugin programmers may reserve ranges of IDs from a
@@ -430,7 +430,7 @@ typedef struct _LADSPA_Descriptor {
instantiation function accepts a sample rate as a parameter. The
plugin descriptor from which this instantiate function was found
must also be passed. This function must return NULL if
- instantiation fails.
+ instantiation fails.
Note that instance initialisation should generally occur in
activate() rather than here. */
@@ -551,7 +551,7 @@ typedef struct _LADSPA_Descriptor {
/* Once an instance of a plugin has been finished with it can be
deleted using the following function. The instance handle passed
ceases to be valid after this call.
-
+
If activate() was called for a plugin instance then a
corresponding call to deactivate() must be made before cleanup()
is called. */
@@ -589,7 +589,7 @@ typedef struct _LADSPA_Descriptor {
const LADSPA_Descriptor * ladspa_descriptor(unsigned long Index);
/* Datatype corresponding to the ladspa_descriptor() function. */
-typedef const LADSPA_Descriptor *
+typedef const LADSPA_Descriptor *
(*LADSPA_Descriptor_Function)(unsigned long Index);
/**********************************************************************/
diff --git a/utils/ladspa2lv2.c b/utils/ladspa2lv2.c
index 023c40d..fb33f5c 100644
--- a/utils/ladspa2lv2.c
+++ b/utils/ladspa2lv2.c
@@ -1,6 +1,6 @@
/* ladspa2lv2
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* This program 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)
@@ -43,9 +43,9 @@ add_resource(librdf_model* model,
{
librdf_node* predicate = librdf_new_node_from_uri_string(world, U(predicate_uri));
librdf_node* object = librdf_new_node_from_uri_string(world, U(object_uri));
-
+
librdf_statement* triple = librdf_new_statement_from_nodes(world, subject, predicate, object);
-
+
librdf_model_add_statement(model, triple);
//librdf_free_statement(triple);
@@ -59,9 +59,9 @@ add_node(librdf_model* model,
librdf_node* object)
{
librdf_node* predicate = librdf_new_node_from_uri_string(world, U(predicate_uri));
-
+
librdf_statement* triple = librdf_new_statement_from_nodes(world, subject, predicate, object);
-
+
librdf_model_add_statement(model, triple);
//librdf_free_statement(triple);
@@ -76,9 +76,9 @@ add_string(librdf_model* model,
{
librdf_node* predicate = librdf_new_node_from_uri_string(world, U(predicate_uri));
librdf_node* object = librdf_new_node_from_literal(world, U(object_string), NULL, 0);
-
+
librdf_statement* triple = librdf_new_statement_from_nodes(world, subject, predicate, object);
-
+
librdf_model_add_statement(model, triple);
//librdf_free_statement(triple);
@@ -99,9 +99,9 @@ add_int(librdf_model* model,
librdf_node* predicate = librdf_new_node_from_uri_string(world, U(predicate_uri));
librdf_node* object = librdf_new_node_from_typed_literal(world, U(object_str), NULL, type);
-
+
librdf_statement* triple = librdf_new_statement_from_nodes(world, subject, predicate, object);
-
+
librdf_model_add_statement(model, triple);
//librdf_free_statement(triple);
@@ -123,9 +123,9 @@ add_float(librdf_model* model,
librdf_node* predicate = librdf_new_node_from_uri_string(world, U(predicate_uri));
librdf_node* object = librdf_new_node_from_typed_literal(world, U(object_str), NULL, type);
-
+
librdf_statement* triple = librdf_new_statement_from_nodes(world, subject, predicate, object);
-
+
librdf_model_add_statement(model, triple);
//librdf_free_statement(triple);
@@ -146,7 +146,7 @@ load_ladspa_plugin(const char* lib_path, unsigned long index)
if (df == NULL) {
dlclose(handle);
return NULL;
- }
+ }
LADSPA_Descriptor* const descriptor = (LADSPA_Descriptor*)df(index);
@@ -174,14 +174,14 @@ add_port_range(LADSPA_Descriptor* plugin,
lower = plugin->PortRangeHints[port_index].LowerBound;
range_valid = true;
}
-
+
if (LADSPA_IS_HINT_INTEGER(hint_descriptor)) {
add_resource(model, port, NS_LV2("portHint"), NS_LV2("integer"));
upper = plugin->PortRangeHints[port_index].UpperBound;
lower = plugin->PortRangeHints[port_index].LowerBound;
range_valid = true;
}
-
+
if (LADSPA_IS_HINT_TOGGLED(hint_descriptor)) {
add_resource(model, port, NS_LV2("portHint"), NS_LV2("toggled"));
upper = 1.0;
@@ -236,12 +236,12 @@ add_port_range(LADSPA_Descriptor* plugin,
} else {
valid = false;
}
-
+
if (valid)
add_float(model, port, NS_LV2("default"), normal);
} else { // No default hint
-
+
if (range_valid && LADSPA_IS_HINT_BOUNDED_BELOW(hint_descriptor)) {
normal = lower;
add_float(model, port, NS_LV2("default"), normal);
@@ -278,11 +278,11 @@ write_lv2_turtle(LADSPA_Descriptor* descriptor, const char* plugin_uri, const ch
U("http://xmlns.com/foaf/0.1/")), "foaf");
librdf_serializer_set_namespace(serializer, librdf_new_uri(world,
U("http://lv2plug.in/ns/lv2core#")), "lv2");
-
+
add_resource(model, plugin,
NS_RDF("type"),
NS_LV2("Plugin"));
-
+
add_string(model, plugin,
NS_DOAP("name"),
descriptor->Name);
@@ -291,7 +291,7 @@ write_lv2_turtle(LADSPA_Descriptor* descriptor, const char* plugin_uri, const ch
add_resource(model, plugin,
NS_LV2("optionalFeature"),
NS_LV2("hardRTCapable"));
-
+
for (uint32_t i=0; i < descriptor->PortCount; ++i) {
char index_str[32];
snprintf(index_str, (size_t)32, "%u", i);
@@ -308,7 +308,7 @@ write_lv2_turtle(LADSPA_Descriptor* descriptor, const char* plugin_uri, const ch
add_int(model, port_node,
NS_LV2("index"),
(int)i);
-
+
if (LADSPA_IS_PORT_INPUT(port_descriptor))
add_resource(model, port_node,
NS_RDF("type"),
@@ -317,7 +317,7 @@ write_lv2_turtle(LADSPA_Descriptor* descriptor, const char* plugin_uri, const ch
add_resource(model, port_node,
NS_RDF("type"),
NS_LV2("OutputPort"));
-
+
if (LADSPA_IS_PORT_AUDIO(port_descriptor))
add_resource(model, port_node,
NS_RDF("type"),
@@ -326,7 +326,7 @@ write_lv2_turtle(LADSPA_Descriptor* descriptor, const char* plugin_uri, const ch
add_resource(model, port_node,
NS_RDF("type"),
NS_LV2("ControlPort"));
-
+
add_string(model, port_node,
NS_LV2("name"),
descriptor->PortNames[i]);
diff --git a/utils/lv2_inspect.c b/utils/lv2_inspect.c
index 33043dd..37f962d 100644
--- a/utils/lv2_inspect.c
+++ b/utils/lv2_inspect.c
@@ -1,6 +1,6 @@
/* lv2_inspect - Display information about an LV2 plugin.
* Copyright (C) 2007 Dave Robillard <drobilla.net>
- *
+ *
* This program 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)
@@ -104,7 +104,7 @@ print_plugin(SLV2Plugin p)
val = slv2_plugin_get_name(p);
printf("\tName: %s\n", slv2_value_as_string(val));
slv2_value_free(val);
-
+
SLV2Value class_label = slv2_plugin_class_get_label(slv2_plugin_get_class(p));
printf("\tClass: %s\n", slv2_value_as_string(class_label));
@@ -113,13 +113,13 @@ print_plugin(SLV2Plugin p)
printf("\tAuthor: %s\n", slv2_value_as_string(val));
slv2_value_free(val);
}
-
+
val = slv2_plugin_get_author_email(p);
if (val) {
printf("\tAuthor Email: %s\n", slv2_value_as_uri(val));
slv2_value_free(val);
}
-
+
val = slv2_plugin_get_author_homepage(p);
if (val) {
printf("\tAuthor Homepage: %s\n", slv2_value_as_uri(val));
@@ -144,16 +144,16 @@ print_plugin(SLV2Plugin p)
printf("%s\n", slv2_value_as_uri(slv2_ui_get_uri(ui)));
const char* binary = slv2_value_as_uri(slv2_ui_get_binary_uri(ui));
-
+
SLV2Values types = slv2_ui_get_classes(ui);
for (unsigned i=0; i < slv2_values_size(types); ++i) {
printf("\t Class: %s\n",
slv2_value_as_uri(slv2_values_get_at(types, i)));
}
-
+
if (binary)
printf("\t Binary: %s\n", binary);
-
+
printf("\t Bundle: %s\n",
slv2_value_as_uri(slv2_ui_get_bundle_uri(ui)));
}
@@ -188,8 +188,8 @@ print_plugin(SLV2Plugin p)
if (features)
printf("\n");
slv2_values_free(features);
-
-
+
+
/* Optional Features */
features = slv2_plugin_get_optional_features(p);
@@ -204,7 +204,7 @@ print_plugin(SLV2Plugin p)
if (features)
printf("\n");
slv2_values_free(features);
-
+
/* Presets */
@@ -219,7 +219,7 @@ SELECT ?name WHERE { <> lv2p:hasPreset ?preset . ?preset dc:title ?name }");
printf("\t %s\n", slv2_value_as_string(name));
}
slv2_results_free(presets);
-
+
/* Ports */
@@ -228,9 +228,9 @@ SELECT ?name WHERE { <> lv2p:hasPreset ?preset . ?preset dc:title ?name }");
float* maxes = calloc(num_ports, sizeof(float));
float* defaults = calloc(num_ports, sizeof(float));
slv2_plugin_get_port_ranges_float(p, mins, maxes, defaults);
-
+
//printf("\n\t# Ports: %d\n", num_ports);
-
+
for (uint32_t i=0; i < num_ports; ++i)
print_port(p, i, mins, maxes, defaults);
@@ -258,7 +258,7 @@ print_usage()
printf("Show information about an installed LV2 plugin.\n");
}
-
+
int
main(int argc, char** argv)
{
@@ -303,7 +303,7 @@ main(int argc, char** argv)
}
ret = (p != NULL ? 0 : -1);
-
+
slv2_value_free(uri);
slv2_plugins_free(world, plugins);
diff --git a/utils/lv2_list.c b/utils/lv2_list.c
index cefd24e..dc08c73 100644
--- a/utils/lv2_list.c
+++ b/utils/lv2_list.c
@@ -1,6 +1,6 @@
/* lv2_list - List system installed LV2 plugins.
* Copyright (C) 2007 Dave Robillard <drobilla.net>
- *
+ *
* This program 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)
@@ -75,7 +75,7 @@ main(int argc, char** argv)
SLV2Plugins plugins = slv2_world_get_all_plugins(world);
list_plugins(plugins);
-
+
slv2_plugins_free(world, plugins);
slv2_world_free(world);