summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-08-08 19:29:23 +0000
committerDavid Robillard <d@drobilla.net>2007-08-08 19:29:23 +0000
commit8bfc7210bb3e1043c1bebb5bc49aa2499cf84b02 (patch)
tree7a4f57cb8257cd98e363a8d0c2a38cedd22afcb8
parenta8320bb94d1809ce2d4873d539fd8e936bc2fdbd (diff)
downloadlilv-8bfc7210bb3e1043c1bebb5bc49aa2499cf84b02.tar.gz
lilv-8bfc7210bb3e1043c1bebb5bc49aa2499cf84b02.tar.bz2
lilv-8bfc7210bb3e1043c1bebb5bc49aa2499cf84b02.zip
Update ingen for SLV2 changes.
SLV2 0.2.0. git-svn-id: http://svn.drobilla.net/lad/slv2@688 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--configure.ac4
-rw-r--r--hosts/lv2_jack_host.c18
-rw-r--r--hosts/lv2_simple_jack_host.c4
-rw-r--r--slv2/types.h10
-rw-r--r--src/port.c18
-rw-r--r--utils/lv2_inspect.c10
6 files changed, 32 insertions, 32 deletions
diff --git a/configure.ac b/configure.ac
index fc3b1d9..711ab35 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,11 +12,11 @@ AC_PREREQ(2.59)
# Version history:
# 0.0.1 = 0,0,0
# current svn = 2,0,0
-SLV2_API_CURRENT=2
+SLV2_API_CURRENT=3
SLV2_API_REVISION=0
SLV2_API_AGE=0
-AC_INIT([slv2],[0.1.0],[dave@drobilla.net])
+AC_INIT([slv2],[0.2.0],[dave@drobilla.net])
AC_CONFIG_AUX_DIR([config])
diff --git a/hosts/lv2_jack_host.c b/hosts/lv2_jack_host.c
index 660c14c..a92cb62 100644
--- a/hosts/lv2_jack_host.c
+++ b/hosts/lv2_jack_host.c
@@ -173,7 +173,7 @@ create_port(struct JackHost* host,
struct Port* const port = &host->ports[port_index];
port->direction = SLV2_PORT_DIRECTION_UNKNOWN;
- port->type = SLV2_PORT_TYPE_UNKNOWN;
+ port->type = SLV2_PORT_DATA_TYPE_UNKNOWN;
port->slv2_port = slv2_plugin_get_port_by_index(host->plugin, port_index);
port->jack_port = NULL;
port->control = 0.0f;
@@ -190,7 +190,7 @@ create_port(struct JackHost* host,
/* Get the (data) type of the port (control, audio, MIDI, OSC) */
port->type = slv2_port_get_data_type(host->plugin, port->slv2_port);
- if (port->type == SLV2_PORT_TYPE_CONTROL)
+ if (port->type == SLV2_PORT_DATA_TYPE_CONTROL)
port->control = slv2_port_get_default_value(host->plugin, port->slv2_port);
enum JackPortFlags jack_flags = 0;
@@ -206,21 +206,21 @@ create_port(struct JackHost* host,
}
/* Set control values */
- if (port->direction == SLV2_PORT_DIRECTION_INPUT && port->type == SLV2_PORT_TYPE_CONTROL) {
+ if (port->direction == SLV2_PORT_DIRECTION_INPUT && port->type == SLV2_PORT_DATA_TYPE_CONTROL) {
port->control = slv2_port_get_default_value(host->plugin, port->slv2_port);
printf("Set %s to %f\n", symbol, host->ports[port_index].control);
}
/* Connect the port based on it's type */
switch (port->type) {
- case SLV2_PORT_TYPE_CONTROL:
+ case SLV2_PORT_DATA_TYPE_CONTROL:
slv2_instance_connect_port(host->instance, port_index, &port->control);
break;
- case SLV2_PORT_TYPE_AUDIO:
+ case SLV2_PORT_DATA_TYPE_AUDIO:
port->jack_port = jack_port_register(host->jack_client,
symbol, JACK_DEFAULT_AUDIO_TYPE, jack_flags, 0);
break;
- case SLV2_PORT_TYPE_MIDI:
+ case SLV2_PORT_DATA_TYPE_MIDI:
port->jack_port = jack_port_register(host->jack_client,
symbol, JACK_DEFAULT_MIDI_TYPE, JackPortIsInput, 0);
port->midi_buffer = lv2midi_new(MIDI_BUFFER_SIZE);
@@ -247,12 +247,12 @@ jack_process_cb(jack_nframes_t nframes, void* data)
if (!host->ports[p].jack_port)
continue;
- if (host->ports[p].type == SLV2_PORT_TYPE_AUDIO) {
+ if (host->ports[p].type == SLV2_PORT_DATA_TYPE_AUDIO) {
slv2_instance_connect_port(host->instance, p,
jack_port_get_buffer(host->ports[p].jack_port, nframes));
- } else if (host->ports[p].type == SLV2_PORT_TYPE_MIDI) {
+ } else if (host->ports[p].type == SLV2_PORT_DATA_TYPE_MIDI) {
lv2midi_reset_buffer(host->ports[p].midi_buffer);
@@ -287,7 +287,7 @@ jack_process_cb(jack_nframes_t nframes, void* data)
for (uint32_t p=0; p < host->num_ports; ++p) {
if (host->ports[p].jack_port
&& host->ports[p].direction == SLV2_PORT_DIRECTION_OUTPUT
- && host->ports[p].type == SLV2_PORT_TYPE_MIDI) {
+ && host->ports[p].type == SLV2_PORT_DATA_TYPE_MIDI) {
void* jack_buffer = jack_port_get_buffer(host->ports[p].jack_port, nframes);
diff --git a/hosts/lv2_simple_jack_host.c b/hosts/lv2_simple_jack_host.c
index 1c279ec..5543074 100644
--- a/hosts/lv2_simple_jack_host.c
+++ b/hosts/lv2_simple_jack_host.c
@@ -167,7 +167,7 @@ create_port(struct JackHost* host,
SLV2PortDataType type = slv2_port_get_data_type(host->plugin, port);
/* Connect control ports to controls array */
- if (type == SLV2_PORT_TYPE_CONTROL) {
+ if (type == SLV2_PORT_DATA_TYPE_CONTROL) {
/* Set default control values for inputs */
if (direction == SLV2_PORT_DIRECTION_INPUT) {
@@ -177,7 +177,7 @@ create_port(struct JackHost* host,
slv2_instance_connect_port(host->instance, index, &host->controls[index]);
- } else if (type == SLV2_PORT_TYPE_AUDIO) {
+ } else if (type == SLV2_PORT_DATA_TYPE_AUDIO) {
host->jack_ports[index] = jack_port_register(host->jack_client, symbol,
JACK_DEFAULT_AUDIO_TYPE,
diff --git a/slv2/types.h b/slv2/types.h
index 275d7c4..5cb21f4 100644
--- a/slv2/types.h
+++ b/slv2/types.h
@@ -36,11 +36,11 @@ extern "C" {
* or a custom query.
*/
typedef enum _SLV2PortDataType {
- SLV2_PORT_TYPE_UNKNOWN,
- SLV2_PORT_TYPE_CONTROL, /**< One float per block */
- SLV2_PORT_TYPE_AUDIO, /**< One float per frame */
- SLV2_PORT_TYPE_MIDI, /**< A buffer of MIDI data (LL extension) */
- SLV2_PORT_TYPE_OSC, /**< A buffer of OSC data (DR extension) */
+ SLV2_PORT_DATA_TYPE_UNKNOWN,
+ SLV2_PORT_DATA_TYPE_CONTROL, /**< One float per block */
+ SLV2_PORT_DATA_TYPE_AUDIO, /**< One float per frame */
+ SLV2_PORT_DATA_TYPE_MIDI, /**< A buffer of MIDI data (LL extension) */
+ SLV2_PORT_DATA_TYPE_OSC, /**< A buffer of OSC data (DR extension) */
} SLV2PortDataType;
/** Direction (input or output) of a port
diff --git a/src/port.c b/src/port.c
index fa28d93..3145ee2 100644
--- a/src/port.c
+++ b/src/port.c
@@ -97,7 +97,7 @@ slv2_port_get_data_type(SLV2Plugin p,
{
SLV2Values type = slv2_port_get_value(p, port, "rdf:type");
- SLV2PortDataType ret = SLV2_PORT_TYPE_UNKNOWN;
+ SLV2PortDataType ret = SLV2_PORT_DATA_TYPE_UNKNOWN;
if (!type)
return ret;
@@ -107,13 +107,13 @@ slv2_port_get_data_type(SLV2Plugin p,
if (slv2_value_is_uri(val)) {
const char* uri = slv2_value_as_uri(val);
if (!strcmp(uri, "http://lv2plug.in/ns/lv2core#ControlPort"))
- ret = SLV2_PORT_TYPE_CONTROL;
+ ret = SLV2_PORT_DATA_TYPE_CONTROL;
else if (!strcmp(uri, "http://lv2plug.in/ns/lv2core#AudioPort"))
- ret = SLV2_PORT_TYPE_AUDIO;
+ ret = SLV2_PORT_DATA_TYPE_AUDIO;
else if (!strcmp(uri, "http://ll-plugins.nongnu.org/lv2/ext/MidiPort"))
- ret = SLV2_PORT_TYPE_MIDI;
+ ret = SLV2_PORT_DATA_TYPE_MIDI;
else if (!strcmp(uri, "http://drobilla.net/ns/lv2ext/osc/0#OSCPort"))
- ret = SLV2_PORT_TYPE_OSC;
+ ret = SLV2_PORT_DATA_TYPE_OSC;
}
}
@@ -141,13 +141,13 @@ slv2_port_has_hint(SLV2Plugin p,
const char* uri = slv2_value_as_uri(val);
if (!strcmp(uri, "http://lv2plug.in/ns/lv2core#connectionOptional"))
return true;
- ret = SLV2_PORT_TYPE_CONTROL;
+ ret = SLV2_PORT_DATA_TYPE_CONTROL;
else if (!strcmp(uri, "http://lv2plug.in/ns/lv2core#AudioPort"))
- ret = SLV2_PORT_TYPE_AUDIO;
+ ret = SLV2_PORT_DATA_TYPE_AUDIO;
else if (!strcmp(uri, "http://ll-plugins.nongnu.org/lv2/ext/MidiPort"))
- ret = SLV2_PORT_TYPE_MIDI;
+ ret = SLV2_PORT_DATA_TYPE_MIDI;
else if (!strcmp(uri, "http://drobilla.net/ns/lv2ext/osc/0#OSCPort"))
- ret = SLV2_PORT_TYPE_OSC;
+ ret = SLV2_PORT_DATA_TYPE_OSC;
}
}
diff --git a/utils/lv2_inspect.c b/utils/lv2_inspect.c
index abe0234..bf02938 100644
--- a/utils/lv2_inspect.c
+++ b/utils/lv2_inspect.c
@@ -48,16 +48,16 @@ print_port(SLV2Plugin p, uint32_t index)
printf("\n\t\tType: ");
switch (type) {
- case SLV2_PORT_TYPE_CONTROL:
+ case SLV2_PORT_DATA_TYPE_CONTROL:
printf("Control");
break;
- case SLV2_PORT_TYPE_AUDIO:
+ case SLV2_PORT_DATA_TYPE_AUDIO:
printf("Audio");
break;
- case SLV2_PORT_TYPE_MIDI:
+ case SLV2_PORT_DATA_TYPE_MIDI:
printf("MIDI");
break;
- case SLV2_PORT_TYPE_OSC:
+ case SLV2_PORT_DATA_TYPE_OSC:
printf("OSC");
break;
default:
@@ -72,7 +72,7 @@ print_port(SLV2Plugin p, uint32_t index)
printf("\t\tName: %s\n", str);
free(str);
- if (type == SLV2_PORT_TYPE_CONTROL) {
+ if (type == SLV2_PORT_DATA_TYPE_CONTROL) {
printf("\t\tMinimum: %f\n", slv2_port_get_minimum_value(p, port));
printf("\t\tMaximum: %f\n", slv2_port_get_maximum_value(p, port));
printf("\t\tDefault: %f\n", slv2_port_get_default_value(p, port));