summaryrefslogtreecommitdiffstats
path: root/meta-multimedia/recipes-multimedia/fluidsynth/files/0001-avoid-buffer-overrun-in-fluid_synth_nwrite_float.patch
diff options
context:
space:
mode:
authorAndreas Müller <schnitzeltony@gmail.com>2017-12-01 12:08:10 +0100
committerArmin Kuster <akuster808@gmail.com>2017-12-11 07:58:56 -0800
commitda778f933ccf34d01dfe8ca273c2191acfb36ef3 (patch)
tree80ee785896568c2fd6d8b64012090a9ad21446aa /meta-multimedia/recipes-multimedia/fluidsynth/files/0001-avoid-buffer-overrun-in-fluid_synth_nwrite_float.patch
parentc0b74f42e00c84ba8419bc28de564cfa5c8d7987 (diff)
downloadmeta-openembedded-da778f933ccf34d01dfe8ca273c2191acfb36ef3.tar.gz
fluidsynth: performance improvements
* Use floats instead of double for sound calculations. This improves performance notable and was default for version 1.1.6 using autotools. * Fix buffer overrun when using floats * Make use of ARM NEON for multithreading enabled Performance and sound correctnes was tested with qtractor and a reworked version of fluidsynth-dssi [1-2]. Tests were performed for single- and multithreading enabled. [1] https://github.com/schnitzeltony/fluidsynth-dssi/commit/bad09c6f5c5508c5f5330aa5188510f975e50c50 [2] https://github.com/schnitzeltony/meta-qt5-extra/blob/master/recipes-misc/recipes-multimedia/fluidsynth/fluidsynth-dssi_1.0.0.bb Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-multimedia/recipes-multimedia/fluidsynth/files/0001-avoid-buffer-overrun-in-fluid_synth_nwrite_float.patch')
-rw-r--r--meta-multimedia/recipes-multimedia/fluidsynth/files/0001-avoid-buffer-overrun-in-fluid_synth_nwrite_float.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/meta-multimedia/recipes-multimedia/fluidsynth/files/0001-avoid-buffer-overrun-in-fluid_synth_nwrite_float.patch b/meta-multimedia/recipes-multimedia/fluidsynth/files/0001-avoid-buffer-overrun-in-fluid_synth_nwrite_float.patch
new file mode 100644
index 0000000000..dda76cfee6
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/fluidsynth/files/0001-avoid-buffer-overrun-in-fluid_synth_nwrite_float.patch
@@ -0,0 +1,32 @@
1From a13cb63103aa56b5e8bad816c7d13d6e01c0cd9f Mon Sep 17 00:00:00 2001
2From: derselbst <tom.mbrt@googlemail.com>
3Date: Sun, 26 Nov 2017 22:12:12 +0100
4Subject: [PATCH 1/2] avoid buffer overrun in fluid_synth_nwrite_float()
5
6Upstream-Status: Backport [1]
7
8[1] https://github.com/FluidSynth/fluidsynth/commit/a13cb63103aa56b5e8bad816c7d13d6e01c0cd9f
9---
10 src/synth/fluid_synth.c | 4 ++--
11 1 file changed, 2 insertions(+), 2 deletions(-)
12
13diff --git a/src/synth/fluid_synth.c b/src/synth/fluid_synth.c
14index 266d759..14f6b21 100644
15--- a/src/synth/fluid_synth.c
16+++ b/src/synth/fluid_synth.c
17@@ -2752,10 +2752,10 @@ fluid_synth_nwrite_float(fluid_synth_t* synth, int len,
18 {
19 #ifdef WITH_FLOAT
20 if(fx_left != NULL)
21- FLUID_MEMCPY(fx_left[i + count], fx_left_in[i], bytes);
22+ FLUID_MEMCPY(fx_left[i] + count, fx_left_in[i], bytes);
23
24 if(fx_right != NULL)
25- FLUID_MEMCPY(fx_right[i + count], fx_right_in[i], bytes);
26+ FLUID_MEMCPY(fx_right[i] + count, fx_right_in[i], bytes);
27 #else //WITH_FLOAT
28 int j;
29 if(fx_left != NULL) {
30--
312.9.5
32