From 75473961a3322945dc11ddcff6d6498ec1e4d94d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 28 Oct 2006 20:05:22 +0000 Subject: Clarified lv2.h header for HostFeatures parameter, associated changes to SLV2. git-svn-id: http://svn.drobilla.net/lad/slv2@195 a436a847-0d15-0410-975c-d299462d15a1 --- examples/hosts/jack_host.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'examples') diff --git a/examples/hosts/jack_host.c b/examples/hosts/jack_host.c index a29fb13..655c939 100644 --- a/examples/hosts/jack_host.c +++ b/examples/hosts/jack_host.c @@ -28,7 +28,7 @@ struct JackHost { jack_client_t* jack_client; /**< Jack client */ SLV2Plugin* plugin; /**< Plugin "class" (actually just a few strings) */ SLV2Instance* instance; /**< Plugin "instance" (loaded shared lib) */ - size_t num_ports; /**< Size of the two following arrays: */ + uint32_t num_ports; /**< Size of the two following arrays: */ jack_port_t** jack_ports; /**< For audio ports, otherwise NULL */ float* controls; /**< For control ports, otherwise 0.0f */ }; @@ -97,10 +97,10 @@ main(int argc, char** argv) /* Create ports */ host.num_ports = slv2_plugin_get_num_ports(host.plugin); - host.jack_ports = calloc(host.num_ports, sizeof(jack_port_t*)); - host.controls = calloc(host.num_ports, sizeof(float*)); + host.jack_ports = calloc((size_t)host.num_ports, sizeof(jack_port_t*)); + host.controls = calloc((size_t)host.num_ports, sizeof(float*)); - for (size_t i=0; i < host.num_ports; ++i) + for (uint32_t i=0; i < host.num_ports; ++i) create_port(&host, i); /* Activate plugin and JACK */ @@ -198,7 +198,7 @@ jack_process_cb(jack_nframes_t nframes, void* data) struct JackHost* host = (struct JackHost*)data; /* Connect plugin ports directly to JACK buffers */ - for (size_t i=0; i < host->num_ports; ++i) + for (uint32_t i=0; i < host->num_ports; ++i) if (host->jack_ports[i] != NULL) slv2_instance_connect_port(host->instance, i, jack_port_get_buffer(host->jack_ports[i], nframes)); -- cgit v1.2.1