summaryrefslogtreecommitdiffstats
path: root/hosts/lv2_simple_jack_host.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-02-09 00:17:15 +0000
committerDavid Robillard <d@drobilla.net>2007-02-09 00:17:15 +0000
commit200565b81542d1b0fde1a657b807646733f2508c (patch)
tree85d2b9890c7edc69ee9843812f758f32e9b4fdd6 /hosts/lv2_simple_jack_host.c
parent735173b0f47f362896594deab1a3b76ac3f7081f (diff)
downloadlilv-200565b81542d1b0fde1a657b807646733f2508c.tar.gz
lilv-200565b81542d1b0fde1a657b807646733f2508c.tar.bz2
lilv-200565b81542d1b0fde1a657b807646733f2508c.zip
Applied patch from Steve Harris, changes to work with new LV2 ontology port classes.
git-svn-id: http://svn.drobilla.net/lad/slv2@291 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'hosts/lv2_simple_jack_host.c')
-rw-r--r--hosts/lv2_simple_jack_host.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/hosts/lv2_simple_jack_host.c b/hosts/lv2_simple_jack_host.c
index ef386b7..5e1e0a9 100644
--- a/hosts/lv2_simple_jack_host.c
+++ b/hosts/lv2_simple_jack_host.c
@@ -155,12 +155,6 @@ create_port(struct JackHost* host,
{
SLV2PortID id = slv2_port_by_index(index);
- /* Make sure this is a float port */
- char* type = slv2_port_get_data_type(host->plugin, id);
- if (strcmp(type, SLV2_DATA_TYPE_FLOAT))
- die("Unrecognized data type, aborting.");
- free(type);
-
/* Get the port symbol (label) for console printing */
char* symbol = slv2_port_get_symbol(host->plugin, id);
@@ -169,27 +163,28 @@ create_port(struct JackHost* host,
host->controls[index] = 0.0f;
/* Get the 'class' of the port (control input, audio output, etc) */
- enum SLV2PortClass class = slv2_port_get_class(host->plugin, id);
+ SLV2PortClass class = slv2_port_get_class(host->plugin, id);
/* Connect the port based on it's 'class' */
switch (class) {
- case SLV2_CONTROL_RATE_INPUT:
+ case SLV2_CONTROL_INPUT:
host->controls[index] = slv2_port_get_default_value(host->plugin, id);
slv2_instance_connect_port(host->instance, index, &host->controls[index]);
printf("Set %s to %f\n", symbol, host->controls[index]);
break;
- case SLV2_CONTROL_RATE_OUTPUT:
+ case SLV2_CONTROL_OUTPUT:
slv2_instance_connect_port(host->instance, index, &host->controls[index]);
break;
- case SLV2_AUDIO_RATE_INPUT:
+ case SLV2_AUDIO_INPUT:
host->jack_ports[index] = jack_port_register(host->jack_client,
symbol, JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0);
break;
- case SLV2_AUDIO_RATE_OUTPUT:
+ case SLV2_AUDIO_OUTPUT:
host->jack_ports[index] = jack_port_register(host->jack_client,
symbol, JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0);
break;
default:
+ // Simple examples don't have to be robust :)
die("ERROR: Unknown port type, aborting messily!");
}