From f012d45a485f7b818f7d11c95902f92e2496837e Mon Sep 17 00:00:00 2001 From: Paul Ferrand Date: Fri, 13 Dec 2019 13:09:20 +0100 Subject: [PATCH] Corrected a bug where the sample rate would be incorrectly set --- lv2/sfizz.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lv2/sfizz.c b/lv2/sfizz.c index c16307ac..9669fff0 100644 --- a/lv2/sfizz.c +++ b/lv2/sfizz.c @@ -303,7 +303,7 @@ instantiate(const LV2_Descriptor *descriptor, lv2_log_warning(&self->logger, "Got a sample rate but the type was wrong\n"); continue; } - self->sample_rate = *(float *)opt->value; + self->sample_rate = *(int*)opt->value; } else if (!self->expect_nominal_block_length && opt->key == self->max_block_length_uri) { @@ -664,7 +664,7 @@ lv2_set_options(LV2_Handle instance, const LV2_Options_Option *options) lv2_log_warning(&self->logger, "[sfizz] Got a sample rate but the type was wrong\n"); continue; } - self->sample_rate = *(float *)opt->value; + self->sample_rate = *(int*)opt->value; sfizz_set_sample_rate(self->synth, self->sample_rate); } else if (!self->expect_nominal_block_length && opt->key == self->max_block_length_uri)