Disable modification checks for the default file and upon restoring
Reenabled if the file was properly restored
This commit is contained in:
parent
a29b04eb86
commit
8e4c3dfbb3
1 changed files with 3 additions and 1 deletions
|
|
@ -344,7 +344,7 @@ instantiate(const LV2_Descriptor *descriptor,
|
||||||
self->oversampling = DEFAULT_OVERSAMPLING;
|
self->oversampling = DEFAULT_OVERSAMPLING;
|
||||||
self->preload_size = DEFAULT_PRELOAD;
|
self->preload_size = DEFAULT_PRELOAD;
|
||||||
self->stretch_tuning = 0.0f;
|
self->stretch_tuning = 0.0f;
|
||||||
self->check_modification = true;
|
self->check_modification = false;
|
||||||
self->sample_counter = 0;
|
self->sample_counter = 0;
|
||||||
|
|
||||||
// Get the features from the host and populate the structure
|
// 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.
|
// Load an empty file to remove the default sine, and then the new file.
|
||||||
sfizz_load_string(self->synth, "empty.sfz", "");
|
sfizz_load_string(self->synth, "empty.sfz", "");
|
||||||
|
self->check_modification = false;
|
||||||
if (sfizz_lv2_load_file(instance, self->sfz_file_path))
|
if (sfizz_lv2_load_file(instance, self->sfz_file_path))
|
||||||
{
|
{
|
||||||
lv2_log_note(&self->logger,
|
lv2_log_note(&self->logger,
|
||||||
"[sfizz] Restoring the file %s\n", self->sfz_file_path);
|
"[sfizz] Restoring the file %s\n", self->sfz_file_path);
|
||||||
|
self->check_modification = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue