From 8e4c3dfbb3eac170551ddf4b828535d0e725d28c Mon Sep 17 00:00:00 2001 From: Paul Ferrand Date: Sun, 5 Jul 2020 11:53:41 +0200 Subject: [PATCH] Disable modification checks for the default file and upon restoring Reenabled if the file was properly restored --- lv2/sfizz.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lv2/sfizz.c b/lv2/sfizz.c index 930c8380..03cf1785 100644 --- a/lv2/sfizz.c +++ b/lv2/sfizz.c @@ -344,7 +344,7 @@ instantiate(const LV2_Descriptor *descriptor, self->oversampling = DEFAULT_OVERSAMPLING; self->preload_size = DEFAULT_PRELOAD; self->stretch_tuning = 0.0f; - self->check_modification = true; + self->check_modification = false; self->sample_counter = 0; // Get the features from the host and populate the structure @@ -1033,10 +1033,12 @@ restore(LV2_Handle instance, // Load an empty file to remove the default sine, and then the new file. sfizz_load_string(self->synth, "empty.sfz", ""); + self->check_modification = false; if (sfizz_lv2_load_file(instance, self->sfz_file_path)) { lv2_log_note(&self->logger, "[sfizz] Restoring the file %s\n", self->sfz_file_path); + self->check_modification = true; } else {