aboutsummaryrefslogtreecommitdiff
path: root/games/RetroArch/libretro.patch
diff options
context:
space:
mode:
Diffstat (limited to 'games/RetroArch/libretro.patch')
-rw-r--r--games/RetroArch/libretro.patch71
1 files changed, 71 insertions, 0 deletions
diff --git a/games/RetroArch/libretro.patch b/games/RetroArch/libretro.patch
new file mode 100644
index 0000000000000..244be47300f52
--- /dev/null
+++ b/games/RetroArch/libretro.patch
@@ -0,0 +1,71 @@
+From 7c22f265b8928aca6e5706ab3a8bab2de0e24b8c Mon Sep 17 00:00:00 2001
+From: twinaphex <libretro@gmail.com>
+Date: Fri, 31 Aug 2018 02:28:20 +0200
+Subject: [PATCH] Update libretro-common
+
+---
+ libretro-common/audio/dsp_filters/reverb.c | 18 +++++-------------
+ 1 file changed, 5 insertions(+), 13 deletions(-)
+
+diff --git a/libretro-common/audio/dsp_filters/reverb.c b/libretro-common/audio/dsp_filters/reverb.c
+index e9bc8170e1..d1a770fd34 100644
+--- a/libretro-common/audio/dsp_filters/reverb.c
++++ b/libretro-common/audio/dsp_filters/reverb.c
+@@ -96,8 +96,8 @@ struct revmodel
+ struct comb combL[numcombs];
+ struct allpass allpassL[numallpasses];
+
+- float **bufcomb;
+- float **bufallpass;
++ float *bufcomb[numcombs];
++ float *bufallpass[numallpasses];
+
+ float gain;
+ float roomsize, roomsize1;
+@@ -194,27 +194,23 @@ static void revmodel_init(struct revmodel *rev,int srate)
+ double r = srate * (1 / 44100.0);
+ unsigned c;
+
+- rev->bufcomb=malloc(numcombs*sizeof(float*));
+ for (c = 0; c < numcombs; ++c)
+ {
+ rev->bufcomb[c] = malloc(r*comb_lengths[c]*sizeof(float));
+ rev->combL[c].buffer = rev->bufcomb[c];
++ memset(rev->combL[c].buffer,0,r*comb_lengths[c]*sizeof(float));
+ rev->combL[c].bufsize=r*comb_lengths[c];
+ }
+
+- rev->bufallpass=malloc(numallpasses*sizeof(float*));
+ for (c = 0; c < numallpasses; ++c)
+ {
+ rev->bufallpass[c] = malloc(r*allpass_lengths[c]*sizeof(float));
+ rev->allpassL[c].buffer = rev->bufallpass[c];
++ memset(rev->allpassL[c].buffer,0,r*allpass_lengths[c]*sizeof(float));
+ rev->allpassL[c].bufsize=r*allpass_lengths[c];
++ rev->allpassL[c].feedback = 0.5f;
+ }
+
+- rev->allpassL[0].feedback = 0.5f;
+- rev->allpassL[1].feedback = 0.5f;
+- rev->allpassL[2].feedback = 0.5f;
+- rev->allpassL[3].feedback = 0.5f;
+-
+ revmodel_setwet(rev, initialwet);
+ revmodel_setroomsize(rev, initialroom);
+ revmodel_setdry(rev, initialdry);
+@@ -237,15 +233,11 @@ static void reverb_free(void *data)
+ free(rev->left.bufcomb[i]);
+ free(rev->right.bufcomb[i]);
+ }
+- free(rev->left.bufcomb);
+- free(rev->right.bufcomb);
+
+ for (i = 0; i < numallpasses; i++) {
+ free(rev->left.bufallpass[i]);
+ free(rev->right.bufallpass[i]);
+ }
+- free(rev->left.bufallpass);
+- free(rev->right.bufallpass);
+ free(data);
+ }
+