aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-03-10 13:55:56 -0500
committerDavid Robillard <d@drobilla.net>2021-03-10 13:55:56 -0500
commit611759daacc377a2dba97723097338fceffd6ef8 (patch)
tree5519f9bfb795b6d5e6cc97be96a91e6884f92ec9
parent446232eade7b08360fbadf6d16ed7a1ee7481faf (diff)
downloadlv2-611759daacc377a2dba97723097338fceffd6ef8.tar.xz
Fix warnings with VS2019HEADmaster
-rw-r--r--lv2/core/lv2_util.h2
-rw-r--r--plugins/eg-metro.lv2/metro.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/lv2/core/lv2_util.h b/lv2/core/lv2_util.h
index 5dab8a0..f3766aa 100644
--- a/lv2/core/lv2_util.h
+++ b/lv2/core/lv2_util.h
@@ -81,7 +81,7 @@ lv2_features_query(const LV2_Feature* const* features, ...)
const char* uri = NULL;
while ((uri = va_arg(args, const char*))) {
void** data = va_arg(args, void**);
- bool required = va_arg(args, int);
+ bool required = (bool)va_arg(args, int);
*data = lv2_features_data(features, uri);
if (required && !*data) {
diff --git a/plugins/eg-metro.lv2/metro.c b/plugins/eg-metro.lv2/metro.c
index 46ca41b..87a9029 100644
--- a/plugins/eg-metro.lv2/metro.c
+++ b/plugins/eg-metro.lv2/metro.c
@@ -223,7 +223,7 @@ play(Metro* self, uint32_t begin, uint32_t end)
switch (self->state) {
case STATE_ATTACK:
// Amplitude increases from 0..1 until attack_len
- output[i] = self->wave[self->wave_offset] * self->elapsed_len /
+ output[i] = self->wave[self->wave_offset] * (float)self->elapsed_len /
(float)self->attack_len;
if (self->elapsed_len >= self->attack_len) {
self->state = STATE_DECAY;