External, Non-PPA KXStudio Repository
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.4KB

  1. From 611759daacc377a2dba97723097338fceffd6ef8 Mon Sep 17 00:00:00 2001
  2. From: David Robillard <d@drobilla.net>
  3. Date: Wed, 10 Mar 2021 13:55:56 -0500
  4. Subject: [PATCH] Fix warnings with VS2019
  5. ---
  6. lv2/core/lv2_util.h | 2 +-
  7. plugins/eg-metro.lv2/metro.c | 2 +-
  8. 2 files changed, 2 insertions(+), 2 deletions(-)
  9. diff --git a/lv2/core/lv2_util.h b/lv2/core/lv2_util.h
  10. index 5dab8a02..f3766aaf 100644
  11. --- a/lv2/core/lv2_util.h
  12. +++ b/lv2/core/lv2_util.h
  13. @@ -81,7 +81,7 @@ lv2_features_query(const LV2_Feature* const* features, ...)
  14. const char* uri = NULL;
  15. while ((uri = va_arg(args, const char*))) {
  16. void** data = va_arg(args, void**);
  17. - bool required = va_arg(args, int);
  18. + bool required = (bool)va_arg(args, int);
  19. *data = lv2_features_data(features, uri);
  20. if (required && !*data) {
  21. diff --git a/plugins/eg-metro.lv2/metro.c b/plugins/eg-metro.lv2/metro.c
  22. index 46ca41b8..87a90292 100644
  23. --- a/plugins/eg-metro.lv2/metro.c
  24. +++ b/plugins/eg-metro.lv2/metro.c
  25. @@ -223,7 +223,7 @@ play(Metro* self, uint32_t begin, uint32_t end)
  26. switch (self->state) {
  27. case STATE_ATTACK:
  28. // Amplitude increases from 0..1 until attack_len
  29. - output[i] = self->wave[self->wave_offset] * self->elapsed_len /
  30. + output[i] = self->wave[self->wave_offset] * (float)self->elapsed_len /
  31. (float)self->attack_len;
  32. if (self->elapsed_len >= self->attack_len) {
  33. self->state = STATE_DECAY;