diff --git a/recipes-misc/recipes-multimedia/calf-studio-gear/calf_git.bb b/recipes-misc/recipes-multimedia/calf-studio-gear/calf_git.bb index 93d8342e..59f42dee 100644 --- a/recipes-misc/recipes-multimedia/calf-studio-gear/calf_git.bb +++ b/recipes-misc/recipes-multimedia/calf-studio-gear/calf_git.bb @@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = " \ SRC_URI = " \ git://github.com/calf-studio-gear/calf.git \ file://0001-Do-store-calfmakerdf-commandline-for-later-use-in-qe.patch \ + file://0002-fluidsynth-Activate-synth.dynamic-sample-loading-for.patch \ " SRCREV = "e5c08dc2483c444d18d24a37c395274002320f5c" S = "${WORKDIR}/git" diff --git a/recipes-misc/recipes-multimedia/calf-studio-gear/files/0002-fluidsynth-Activate-synth.dynamic-sample-loading-for.patch b/recipes-misc/recipes-multimedia/calf-studio-gear/files/0002-fluidsynth-Activate-synth.dynamic-sample-loading-for.patch new file mode 100644 index 00000000..5a993079 --- /dev/null +++ b/recipes-misc/recipes-multimedia/calf-studio-gear/files/0002-fluidsynth-Activate-synth.dynamic-sample-loading-for.patch @@ -0,0 +1,33 @@ +From 579ce205281dc47c94b0e6392decac9763397a9d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Sun, 13 Jan 2019 12:14:52 +0100 +Subject: [PATCH] fluidsynth: Activate synth.dynamic-sample-loading for + fluidsynth >=2 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This reduces soundfont load time and memory consumption significantly + +Signed-off-by: Andreas Müller +--- + src/fluidsynth.cpp | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/fluidsynth.cpp b/src/fluidsynth.cpp +index 54023dc8..14c018e3 100644 +--- a/src/fluidsynth.cpp ++++ b/src/fluidsynth.cpp +@@ -59,6 +59,9 @@ fluid_synth_t *fluidsynth_audio_module::create_synth(int &new_sfid) + std::fill(set_presets, set_presets + 16, -1); + fluid_settings_t *new_settings = new_fluid_settings(); + fluid_settings_setnum(new_settings, "synth.sample-rate", srate); ++#if FLUIDSYNTH_VERSION_MAJOR >= 2 ++ fluid_settings_setint(new_settings, "synth.dynamic-sample-loading", 1); ++#endif + fluid_synth_t *s = new_fluid_synth(new_settings); + if (!soundfont.empty()) + { +-- +2.20.1 +