aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/eg04-sampler.lv2
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
parent1cb9f77d07c998108d0ba54811ac4604a2b49725 (diff)
downloadlv2-0824237942af542431a8348c55c367242d1bf49a.tar.xz
Fix -Wconversion warnings in headers.
Diffstat (limited to 'plugins/eg04-sampler.lv2')
-rw-r--r--plugins/eg04-sampler.lv2/sampler.c12
-rw-r--r--plugins/eg04-sampler.lv2/uris.h2
2 files changed, 7 insertions, 7 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;
diff --git a/plugins/eg04-sampler.lv2/uris.h b/plugins/eg04-sampler.lv2/uris.h
index c981f9e..f9aa5a7 100644
--- a/plugins/eg04-sampler.lv2/uris.h
+++ b/plugins/eg04-sampler.lv2/uris.h
@@ -72,7 +72,7 @@ static inline LV2_Atom*
write_set_file(LV2_Atom_Forge* forge,
const SamplerURIs* uris,
const char* filename,
- const size_t filename_len)
+ const uint32_t filename_len)
{
LV2_Atom_Forge_Frame frame;
LV2_Atom* set = (LV2_Atom*)lv2_atom_forge_object(