diff --git a/recipes-misc/recipes-multimedia/smbolton/fluidsynth-dssi/0001-Reduce-FSD_MAX_BURST_SIZE-512-128.patch b/recipes-misc/recipes-multimedia/smbolton/fluidsynth-dssi/0001-Reduce-FSD_MAX_BURST_SIZE-512-128.patch new file mode 100644 index 00000000..f6c0cfa8 --- /dev/null +++ b/recipes-misc/recipes-multimedia/smbolton/fluidsynth-dssi/0001-Reduce-FSD_MAX_BURST_SIZE-512-128.patch @@ -0,0 +1,33 @@ +From e37bcc39a2f6c720335a1431e1a37d142f066c3d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Mon, 14 Jan 2019 21:03:35 +0100 +Subject: [PATCH 1/2] Reduce FSD_MAX_BURST_SIZE 512 -> 128 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +* This saves 96K RAM +* Tested and 'paper debugged' fsd_run_multiple_synths: There are no issues to + expect + +Signed-off-by: Andreas Müller +--- + src/fluidsynth-dssi.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/fluidsynth-dssi.h b/src/fluidsynth-dssi.h +index 6f0e57f..9f347ab 100644 +--- a/src/fluidsynth-dssi.h ++++ b/src/fluidsynth-dssi.h +@@ -59,7 +59,7 @@ + #define FSD_MAX_POLYPHONY 256 + #define FSD_DEFAULT_POLYPHONY 256 + +-#define FSD_MAX_BURST_SIZE 512 ++#define FSD_MAX_BURST_SIZE 128 + + typedef enum { + PORT_OUTPUT_LEFT = 0, +-- +2.20.1 + diff --git a/recipes-misc/recipes-multimedia/smbolton/fluidsynth-dssi/0002-Don-t-trash-unused-channels.patch b/recipes-misc/recipes-multimedia/smbolton/fluidsynth-dssi/0002-Don-t-trash-unused-channels.patch new file mode 100644 index 00000000..6fbebb7d --- /dev/null +++ b/recipes-misc/recipes-multimedia/smbolton/fluidsynth-dssi/0002-Don-t-trash-unused-channels.patch @@ -0,0 +1,50 @@ +From 3a9b7f16ce00a069decd9e4b6efbe31389fefd6d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Sun, 13 Jan 2019 11:58:39 +0100 +Subject: [PATCH 2/2] Don't trash unused channels +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +* This enhances peformance: Useless buffer copies are avoided +* Patches did not make it upstream but we have them in meta-multimedia + +Signed-off-by: Andreas Müller +--- + src/fluidsynth-dssi.c | 6 +++--- + src/fluidsynth-dssi.h | 1 - + 2 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/src/fluidsynth-dssi.c b/src/fluidsynth-dssi.c +index e1e8251..11a92ee 100644 +--- a/src/fluidsynth-dssi.c ++++ b/src/fluidsynth-dssi.c +@@ -883,10 +883,10 @@ fsd_run_multiple_synths(unsigned long instance_count, LADSPA_Handle *handles, + instances[i]->pending_preset_change = -1; + } + } +- /* Trash unmapped channels by default */ ++ /* Default: Set unused by default */ + for (i = 0; i < fsd_settings.channel_count; i++) { +- l_outputs[i] = fsd_synth.bit_bucket; +- r_outputs[i] = fsd_synth.bit_bucket; ++ l_outputs[i] = NULL; ++ r_outputs[i] = NULL; + } + + /* fluid_synth_nwrite_float() works correctly in FluidSynth beginning +diff --git a/src/fluidsynth-dssi.h b/src/fluidsynth-dssi.h +index 9f347ab..c34377e 100644 +--- a/src/fluidsynth-dssi.h ++++ b/src/fluidsynth-dssi.h +@@ -117,7 +117,6 @@ struct _fsd_synth_t { + float gain; + int polyphony; + fsd_instance_t **channel_map; +- LADSPA_Data bit_bucket[FSD_MAX_BURST_SIZE]; + }; + + #endif /* _FLUIDSYNTH_DSSI_H */ +-- +2.20.1 + diff --git a/recipes-misc/recipes-multimedia/smbolton/fluidsynth-dssi_1.0.0.bb b/recipes-misc/recipes-multimedia/smbolton/fluidsynth-dssi_2.0.0.bb similarity index 82% rename from recipes-misc/recipes-multimedia/smbolton/fluidsynth-dssi_1.0.0.bb rename to recipes-misc/recipes-multimedia/smbolton/fluidsynth-dssi_2.0.0.bb index e258da9c..1d55f5d6 100644 --- a/recipes-misc/recipes-multimedia/smbolton/fluidsynth-dssi_1.0.0.bb +++ b/recipes-misc/recipes-multimedia/smbolton/fluidsynth-dssi_2.0.0.bb @@ -15,11 +15,13 @@ DEPENDS += " \ SRC_URI = " \ git://github.com/schnitzeltony/fluidsynth-dssi.git \ + file://0001-Reduce-FSD_MAX_BURST_SIZE-512-128.patch \ + file://0002-Don-t-trash-unused-channels.patch \ file://fluidsynth-dssi.conf \ " -SRCREV = "001fdea313b923185b7bcb40d317b9a278191ba2" +SRCREV = "c9b41073031dc2ba99c43db1babc9bbfbab2ec1e" S = "${WORKDIR}/git" -PV = "1.0.0+git${SRCPV}" +#PV = "2.0.0+git${SRCPV}" do_install_append() { install -d ${D}/${sysconfdir}/skel/.config/fluidsynth-dssi