ref: 706b6cde3c9a04a80ffa022291d4b532c2d2a82c
parent: a4ca679a65c0aae752f67d0bf97963a61401816c
author: robs <robs>
date: Sat Apr 25 08:16:26 EDT 2009
fix gomp fft crash
--- a/src/effects.c
+++ b/src/effects.c
@@ -198,7 +198,7 @@
{
sox_effect_t * effp1 = &chain->effects[n - 1][0];
sox_effect_t * effp = &chain->effects[n][0];
- int effstatus = SOX_SUCCESS, f;
+ int effstatus = SOX_SUCCESS, f = 0;
size_t i;
const sox_sample_t *ibuf;
size_t idone = effp1->oend - effp1->obeg;
@@ -233,9 +233,14 @@
lsx_fail("flowed asymmetrically!");
effstatus = SOX_EOF;
}
-#endif
idone_last = idonec;
odone_last = odonec;
+#else
+ if (!f) {
+ idone_last = idonec;
+ odone_last = odonec;
+ }
+#endif
if (eff_status_c != SOX_SUCCESS)
effstatus = SOX_EOF;
@@ -245,8 +250,8 @@
for (f = 0; f < (int)effp->flows; ++f)
*obuf++ = chain->obufc[f][i];
- idone = f * idone_last;
- obeg = f * odone_last;
+ idone = effp->flows * idone_last;
+ obeg = effp->flows * odone_last;
}
#if DEBUG_EFFECTS_CHAIN
lsx_report("flow: %5u%5u%5u%5u", pre_idone, pre_odone, idone, obeg);
--- a/src/fft4g.c
+++ b/src/fft4g.c
@@ -706,9 +706,9 @@
/* -------- child routines -------- */
-static void bitrv2(int n, int *ip, double *a)
+static void bitrv2(int n, int *ip0, double *a)
{
- int j, j1, k, k1, l, m, m2;
+ int j, j1, k, k1, l, m, m2, ip[256];
double xr, xi, yr, yi;
ip[0] = 0;
@@ -806,9 +806,9 @@
}
-static void bitrv2conj(int n, int *ip, double *a)
+static void bitrv2conj(int n, int *ip0, double *a)
{
- int j, j1, k, k1, l, m, m2;
+ int j, j1, k, k1, l, m, m2, ip[256];
double xr, xi, yr, yi;
ip[0] = 0;