aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/eg04-sampler.lv2/sampler.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-01-24 01:49:18 +0000
committerDavid Robillard <d@drobilla.net>2014-01-24 01:49:18 +0000
commit0824237942af542431a8348c55c367242d1bf49a (patch)
treeab9afb3a202b434c2198a071bcb8336f2976f2a3 /plugins/eg04-sampler.lv2/sampler.c
parent1cb9f77d07c998108d0ba54811ac4604a2b49725 (diff)
downloadlv2-0824237942af542431a8348c55c367242d1bf49a.tar.xz
Fix -Wconversion warnings in headers.
Diffstat (limited to 'plugins/eg04-sampler.lv2/sampler.c')
-rw-r--r--plugins/eg04-sampler.lv2/sampler.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/eg04-sampler.lv2/sampler.c b/plugins/eg04-sampler.lv2/sampler.c
index ee17312..54da799 100644
--- a/plugins/eg04-sampler.lv2/sampler.c
+++ b/plugins/eg04-sampler.lv2/sampler.c
@@ -48,10 +48,10 @@ enum {
static const char* default_sample_file = "click.wav";
typedef struct {
- SF_INFO info; // Info about sample from sndfile
- float* data; // Sample data in float
- char* path; // Path of file
- size_t path_len; // Length of path
+ SF_INFO info; // Info about sample from sndfile
+ float* data; // Sample data in float
+ char* path; // Path of file
+ uint32_t path_len; // Length of path
} Sample;
typedef struct {
@@ -111,7 +111,7 @@ typedef struct {
static Sample*
load_sample(Sampler* self, const char* path)
{
- const size_t path_len = strlen(path);
+ const size_t path_len = strlen(path);
lv2_log_trace(&self->logger, "Loading sample %s\n", path);
@@ -138,7 +138,7 @@ load_sample(Sampler* self, const char* path)
// Fill sample struct and return it
sample->data = data;
sample->path = (char*)malloc(path_len + 1);
- sample->path_len = path_len;
+ sample->path_len = (uint32_t)path_len;
memcpy(sample->path, path, path_len + 1);
return sample;