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

jm at svn.xiph.org jm at svn.xiph.org
Wed Jan 17 16:33:04 PST 2007


Author: jm
Date: 2007-01-17 16:33:01 -0800 (Wed, 17 Jan 2007)
New Revision: 12342

Modified:
   trunk/speex/libspeex/resample.c
Log:
Actually, basic resampling seems to be working...


Modified: trunk/speex/libspeex/resample.c
===================================================================
--- trunk/speex/libspeex/resample.c	2007-01-17 21:59:49 UTC (rev 12341)
+++ trunk/speex/libspeex/resample.c	2007-01-18 00:33:01 UTC (rev 12342)
@@ -131,7 +131,7 @@
 int main(int argc, char **argv)
 {
    int i;
-   SpeexResamplerState *st = speex_resampler_init(8000, 16000, 1, 1);
+   SpeexResamplerState *st = speex_resampler_init(8000, 12000, 1, 1);
    short *in;
    short *out;
    float *fin, *fout;
@@ -151,12 +151,12 @@
       //fprintf (stderr, "%d\n", out_num);
       for (i=0;i<2*NN;i++)
          out[i]=fout[i];
-      fwrite(out, sizeof(short), 2*NN, stdout);
+      fwrite(out, sizeof(short), out_num, stdout);
    }
-   free(in);
-   free(out);
-   free(fin);
-   free(fout);
+   speex_free(in);
+   speex_free(out);
+   speex_free(fin);
+   speex_free(fout);
    return 0;
 }
 



More information about the commits mailing list