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

jm at svn.xiph.org jm at svn.xiph.org
Sun Feb 12 04:44:34 PST 2006


Author: jm
Date: 2006-02-12 04:44:31 -0800 (Sun, 12 Feb 2006)
New Revision: 10804

Modified:
   trunk/speex/libspeex/testecho.c
Log:
sampling rate option


Modified: trunk/speex/libspeex/testecho.c
===================================================================
--- trunk/speex/libspeex/testecho.c	2006-02-12 11:03:30 UTC (rev 10803)
+++ trunk/speex/libspeex/testecho.c	2006-02-12 12:44:31 UTC (rev 10804)
@@ -12,7 +12,8 @@
 #include "speex/speex_preprocess.h"
 
 
-#define NN 160
+#define NN 128
+#define TAIL 1024
 
 int main(int argc, char **argv)
 {
@@ -31,8 +32,10 @@
    ref_fd  = open (argv[1],  O_RDONLY);
    e_fd    = open (argv[3], O_WRONLY | O_CREAT | O_TRUNC, 0644);
 
-   st = speex_echo_state_init(NN, 8*NN);
+   st = speex_echo_state_init(NN, TAIL);
    den = speex_preprocess_state_init(NN, 8000);
+   int tmp = 8000;
+   speex_echo_ctl(st, SPEEX_ECHO_SET_SAMPLING_RATE, &tmp);
 
    while (read(ref_fd, ref_buf, NN*2))
    {



More information about the commits mailing list