From 4fb81e4a2e68c3340a349c08e32993309f3da7b4 Mon Sep 17 00:00:00 2001 From: Paul Ferrand Date: Sun, 8 Dec 2019 18:18:01 +0100 Subject: [PATCH] Transmit the freewheeling state to the synth --- lv2/sfizz.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lv2/sfizz.c b/lv2/sfizz.c index dc9d8b1b..2ad45de3 100644 --- a/lv2/sfizz.c +++ b/lv2/sfizz.c @@ -488,8 +488,13 @@ run(LV2_Handle instance, uint32_t sample_count) if (!self->control_port || !self->notify_port) return; - if (*(self->freewheel_port) > 0) - lv2_log_note(&self->logger, "[run] Freewheeling set!"); + // Enable freewheeling on the synth if necessary, which wait for + // the background loading queues to flush before rendering. + if (*(self->freewheel_port) > 0) { + sfizz_enable_freewheeling(self->synth); + } else { + sfizz_disable_freewheeling(self->synth); + } // Set up forge to write directly to notify output port. const size_t notify_capacity = self->notify_port->atom.size;