Use a string rather than a file
This commit is contained in:
parent
5b298f10ba
commit
abf22c3546
2 changed files with 2 additions and 9 deletions
11
lv2/sfizz.c
11
lv2/sfizz.c
|
|
@ -305,13 +305,6 @@ sfizz_lv2_get_default_sfz_path(LV2_Handle instance, char *path, size_t size)
|
||||||
snprintf(path, size, "%s/%s", self->bundle_path, "Resources/DefaultInstrument.sfz");
|
snprintf(path, size, "%s/%s", self->bundle_path, "Resources/DefaultInstrument.sfz");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
sfizz_lv2_get_empty_sfz_path(LV2_Handle instance, char *path, size_t size)
|
|
||||||
{
|
|
||||||
sfizz_plugin_t *self = (sfizz_plugin_t *)instance;
|
|
||||||
snprintf(path, size, "%s/%s", self->bundle_path, "Resources/EmptyInstrument.sfz");
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sfizz_lv2_get_default_scala_path(LV2_Handle instance, char *path, size_t size)
|
sfizz_lv2_get_default_scala_path(LV2_Handle instance, char *path, size_t size)
|
||||||
{
|
{
|
||||||
|
|
@ -975,8 +968,8 @@ restore(LV2_Handle instance,
|
||||||
|
|
||||||
lv2_log_note(&self->logger, "[sfizz] Restoring the file %s\n", path);
|
lv2_log_note(&self->logger, "[sfizz] Restoring the file %s\n", path);
|
||||||
// Load an empty file to remove the default sine
|
// Load an empty file to remove the default sine
|
||||||
sfizz_lv2_get_empty_sfz_path(instance, self->sfz_file_path, MAX_PATH_SIZE);
|
strcpy(self->sfz_file_path, "");
|
||||||
sfizz_lv2_load_file(instance, self->sfz_file_path);
|
sfizz_load_string(self->synth, "empty.sfz", "");
|
||||||
|
|
||||||
// Try loading the new file
|
// Try loading the new file
|
||||||
sfizz_lv2_load_file(instance, path);
|
sfizz_lv2_load_file(instance, path);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue