summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-10-28 20:05:22 +0000
committerDavid Robillard <d@drobilla.net>2006-10-28 20:05:22 +0000
commit75473961a3322945dc11ddcff6d6498ec1e4d94d (patch)
tree6a2664363ef415e2ca3e253f201ac015ea5ffe01 /examples
parent75068bb8dc9ae3d6711a5d8548c0c3ede0654f47 (diff)
downloadlilv-75473961a3322945dc11ddcff6d6498ec1e4d94d.tar.gz
lilv-75473961a3322945dc11ddcff6d6498ec1e4d94d.tar.bz2
lilv-75473961a3322945dc11ddcff6d6498ec1e4d94d.zip
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
Diffstat (limited to 'examples')
-rw-r--r--examples/hosts/jack_host.c10
1 files changed, 5 insertions, 5 deletions
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));