diff --git a/lv2/sfizz.c b/lv2/sfizz.c index 2de408b8..2271a466 100644 --- a/lv2/sfizz.c +++ b/lv2/sfizz.c @@ -88,6 +88,10 @@ #define LV2_DEBUG(...) #endif +static const char default_sfz_text[] = + "sample=*sine" "\n" + "ampeg_attack=0.02 ampeg_release=0.1" "\n"; + typedef struct { // Features @@ -416,7 +420,7 @@ instantiate(const LV2_Descriptor *descriptor, } self->synth = sfizz_create_synth(); - sfizz_load_string(self->synth, "default.sfz", "sample=*sine"); + sfizz_load_string(self->synth, "default.sfz", default_sfz_text); return (LV2_Handle)self; } @@ -886,7 +890,7 @@ sfizz_lv2_load_file(LV2_Handle instance, const char *file_path) if (file_path[0] == '\0') { - if (!sfizz_load_string(self->synth, "default.sfz", "sample=*sine")) + if (!sfizz_load_string(self->synth, "default.sfz", default_sfz_text)) return false; } else diff --git a/vst/SfizzVstProcessor.cpp b/vst/SfizzVstProcessor.cpp index 8e430a7d..944a07c3 100644 --- a/vst/SfizzVstProcessor.cpp +++ b/vst/SfizzVstProcessor.cpp @@ -20,6 +20,10 @@ constexpr int fastRound(T x) return static_cast(x + T{ 0.5 }); // NOLINT } +static const char defaultSfzText[] = + "sample=*sine" "\n" + "ampeg_attack=0.02 ampeg_release=0.1" "\n"; + SfizzVstProcessor::SfizzVstProcessor() : _fifoToWorker(64 * 1024) { @@ -342,7 +346,7 @@ void SfizzVstProcessor::loadSfzFileOrDefault(sfz::Sfizz& synth, const std::strin if (!filePath.empty()) synth.loadSfzFile(filePath); else - synth.loadSfzString("default.sfz", "sample=*sine"); + synth.loadSfzString("default.sfz", defaultSfzText); } void SfizzVstProcessor::doBackgroundWork()