From 1bb8aeb07553ea5b13a619aa779665eafaaf2b43 Mon Sep 17 00:00:00 2001 From: fer <82901154+fragfz@users.noreply.github.com> Date: Thu, 8 Dec 2022 19:41:50 +0100 Subject: [PATCH] Update batteur.c. Don't use sample_rate from LV2_Options Otherwise short click and double click is not detected after mod-host commit. //self->sample_rate = (float)opt->value; Looks now that mod-host uses atom_float_uri, sample_rate gets a wrong value. moddevices/mod-host@0d16999 --- lv2/batteur.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lv2/batteur.c b/lv2/batteur.c index c7d0fdc..55c65d8 100644 --- a/lv2/batteur.c +++ b/lv2/batteur.c @@ -378,7 +378,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 = *(float*)opt->value; } else if (!self->expect_nominal_block_length && opt->key == self->max_block_length_uri) { if (opt->type != self->atom_int_uri) { lv2_log_warning(&self->logger, "Got a max block size but the type was wrong\n"); @@ -730,7 +730,7 @@ lv2_set_options(LV2_Handle instance, const LV2_Options_Option* options) 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 = *(float*)opt->value; batteur_set_sample_rate(self->player, self->sample_rate); } else if (!self->expect_nominal_block_length && opt->key == self->max_block_length_uri) { if (opt->type != self->atom_int_uri) {