[xiph-commits] r11312 - trunk/speex/libspeex

jm at svn.xiph.org jm at svn.xiph.org
Fri Apr 28 22:05:41 PDT 2006


Author: jm
Date: 2006-04-28 22:05:39 -0700 (Fri, 28 Apr 2006)
New Revision: 11312

Modified:
   trunk/speex/libspeex/fftwrap.c
Log:
big kludge for braindead (non C99) compilers.


Modified: trunk/speex/libspeex/fftwrap.c
===================================================================
--- trunk/speex/libspeex/fftwrap.c	2006-04-29 05:02:29 UTC (rev 11311)
+++ trunk/speex/libspeex/fftwrap.c	2006-04-29 05:05:39 UTC (rev 11312)
@@ -42,6 +42,7 @@
 
 #include "misc.h"
 
+#define MAX_FFT_SIZE 2048
 
 #ifdef FIXED_POINT
 static int maximize_range(spx_word16_t *in, spx_word16_t *out, spx_word16_t bound, int len)
@@ -239,8 +240,13 @@
    int N = ((struct kiss_config *)table)->N;
 #else
 #endif
+#ifdef VAR_ARRAYS
    spx_word16_t _in[N];
    spx_word16_t _out[N];
+#else
+   spx_word16_t _in[MAX_FFT_SIZE];
+   spx_word16_t _out[MAX_FFT_SIZE];
+#endif
    for (i=0;i<N;i++)
       _in[i] = (int)floor(.5+in[i]);
    spx_fft(table, _in, _out);
@@ -268,8 +274,13 @@
    int N = ((struct kiss_config *)table)->N;
 #else
 #endif
+#ifdef VAR_ARRAYS
    spx_word16_t _in[N];
    spx_word16_t _out[N];
+#else
+   spx_word16_t _in[MAX_FFT_SIZE];
+   spx_word16_t _out[MAX_FFT_SIZE];
+#endif
    for (i=0;i<N;i++)
       _in[i] = (int)floor(.5+in[i]);
    spx_ifft(table, _in, _out);



More information about the commits mailing list