diff options
author | David Robillard <d@drobilla.net> | 2006-07-22 19:19:05 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-07-22 19:19:05 +0000 |
commit | deca2cc89850dffc051d0a0aafc9d681af838934 (patch) | |
tree | cfca762a3b03289385bb40c17673b4483142c420 /examples/hosts | |
parent | c7153b1a3d607108bab6cd8d6719977ffb213092 (diff) | |
download | lilv-deca2cc89850dffc051d0a0aafc9d681af838934.tar.gz lilv-deca2cc89850dffc051d0a0aafc9d681af838934.tar.bz2 lilv-deca2cc89850dffc051d0a0aafc9d681af838934.zip |
Removed data type enumeration in favour of using the URI directly
git-svn-id: http://svn.drobilla.net/lad/libslv2@100 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'examples/hosts')
-rw-r--r-- | examples/hosts/jack_host.c | 7 | ||||
-rw-r--r-- | examples/hosts/test_host.c | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/examples/hosts/jack_host.c b/examples/hosts/jack_host.c index 2247e03..1be62b8 100644 --- a/examples/hosts/jack_host.c +++ b/examples/hosts/jack_host.c @@ -149,10 +149,11 @@ create_port(struct JackHost* host, unsigned long port_index) { /* Make sure this is a float port */ - enum SLV2DataType type = slv2_port_get_data_type(host->plugin, port_index); - if (type != SLV2_DATA_TYPE_FLOAT) + uchar* type = slv2_port_get_data_type(host->plugin, port_index); + 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, port_index); diff --git a/examples/hosts/test_host.c b/examples/hosts/test_host.c index 3ec8d86..16efa11 100644 --- a/examples/hosts/test_host.c +++ b/examples/hosts/test_host.c @@ -61,7 +61,7 @@ create_audio_output() void create_port(SLV2Plugin* plugin, SLV2Instance* instance, - unsigned long port_index) + unsigned long port_index) { enum SLV2PortClass class = slv2_port_get_class(plugin, port_index); |