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

jm at svn.xiph.org jm at svn.xiph.org
Sun Jan 21 05:40:10 PST 2007


Author: jm
Date: 2007-01-21 05:40:08 -0800 (Sun, 21 Jan 2007)
New Revision: 12368

Modified:
   trunk/speex/libspeex/resample.c
Log:
API


Modified: trunk/speex/libspeex/resample.c
===================================================================
--- trunk/speex/libspeex/resample.c	2007-01-21 13:29:28 UTC (rev 12367)
+++ trunk/speex/libspeex/resample.c	2007-01-21 13:40:08 UTC (rev 12368)
@@ -131,12 +131,11 @@
 void speex_resampler_destroy(SpeexResamplerState *st)
 {
    speex_free(st->mem);
-   if (st->sinc_table)
-      speex_free(st->sinc_table);
+   speex_free(st->sinc_table);
    speex_free(st);
 }
 
-void speex_resample_float(SpeexResamplerState *st, int channel_index, const float *in, int *in_len, float *out, int *out_len)
+void speex_resampler_process_float(SpeexResamplerState *st, int channel_index, const float *in, int *in_len, float *out, int *out_len)
 {
    int j=0;
    int N = st->filt_len;
@@ -248,6 +247,9 @@
 {
 }
 
+void speex_resample_reset_mem(SpeexResamplerState *st)
+{
+}
 
 #define NN 256
 
@@ -273,7 +275,7 @@
          fin[i]=in[i];
       in_len = NN;
       out_len = 2*NN;
-      speex_resample_float(st, 0, fin, &in_len, fout, &out_len);
+      speex_resampler_process_float(st, 0, fin, &in_len, fout, &out_len);
       for (i=0;i<out_len;i++)
          out[i]=floor(.5+fout[i]);
       fwrite(out, sizeof(short), out_len, stdout);



More information about the commits mailing list