summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/hosts/jack_host.c7
-rw-r--r--examples/hosts/test_host.c2
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);