[xiph-commits] r14702 - in trunk/speex: . include/speex libspeex

jm at svn.xiph.org jm at svn.xiph.org
Thu Apr 10 20:49:08 PDT 2008


Author: jm
Date: 2008-04-10 20:49:08 -0700 (Thu, 10 Apr 2008)
New Revision: 14702

Modified:
   trunk/speex/configure.ac
   trunk/speex/include/speex/speex_preprocess.h
   trunk/speex/libspeex/preprocess.c
Log:
SPEEX_PREPROCESS_SET_AGC_LEVEL is now back to its original semantic as this
would have caused too much problems. The int version is now called
SPEEX_PREPROCESS_SET_AGC_TARGET.


Modified: trunk/speex/configure.ac
===================================================================
--- trunk/speex/configure.ac	2008-04-11 03:48:46 UTC (rev 14701)
+++ trunk/speex/configure.ac	2008-04-11 03:49:08 UTC (rev 14702)
@@ -7,10 +7,10 @@
 SPEEX_MAJOR_VERSION=1
 SPEEX_MINOR_VERSION=1
 SPEEX_MICRO_VERSION=15
-SPEEX_EXTRA_VERSION=
+SPEEX_EXTRA_VERSION=.2
 #SPEEX_VERSION=
 #SPEEX_VERSION=$SPEEX_MAJOR_VERSION.$SPEEX_MINOR_VERSION.$SPEEX_MICRO_VERSION$SPEEX_EXTRA_VERSION
-SPEEX_VERSION="1.2beta3"
+SPEEX_VERSION="1.2beta3.2"
 
 SPEEX_LT_CURRENT=5
 SPEEX_LT_REVISION=0

Modified: trunk/speex/include/speex/speex_preprocess.h
===================================================================
--- trunk/speex/include/speex/speex_preprocess.h	2008-04-11 03:48:46 UTC (rev 14701)
+++ trunk/speex/include/speex/speex_preprocess.h	2008-04-11 03:49:08 UTC (rev 14702)
@@ -110,9 +110,9 @@
 /** Get preprocessor Voice Activity Detection state */
 #define SPEEX_PREPROCESS_GET_VAD 5
 
-/** Set preprocessor Automatic Gain Control level */
+/** Set preprocessor Automatic Gain Control level (float) */
 #define SPEEX_PREPROCESS_SET_AGC_LEVEL 6
-/** Get preprocessor Automatic Gain Control level */
+/** Get preprocessor Automatic Gain Control level (float) */
 #define SPEEX_PREPROCESS_GET_AGC_LEVEL 7
 
 /** Set preprocessor dereverb state */
@@ -206,6 +206,11 @@
 /** Get speech probability in last frame (int32).  */
 #define SPEEX_PREPROCESS_GET_PROB 45
 
+/** Set preprocessor Automatic Gain Control level (int32) */
+#define SPEEX_PREPROCESS_SET_AGC_TARGET 46
+/** Get preprocessor Automatic Gain Control level (int32) */
+#define SPEEX_PREPROCESS_GET_AGC_TARGET 47
+
 #ifdef __cplusplus
 }
 #endif

Modified: trunk/speex/libspeex/preprocess.c
===================================================================
--- trunk/speex/libspeex/preprocess.c	2008-04-11 03:48:46 UTC (rev 14701)
+++ trunk/speex/libspeex/preprocess.c	2008-04-11 03:49:08 UTC (rev 14702)
@@ -1067,14 +1067,14 @@
       break;
 #ifndef DISABLE_FLOAT_API
    case SPEEX_PREPROCESS_SET_AGC_LEVEL:
-      st->agc_level = (*(spx_int32_t*)ptr);
+      st->agc_level = (*(float*)ptr);
       if (st->agc_level<1)
          st->agc_level=1;
       if (st->agc_level>32768)
          st->agc_level=32768;
       break;
    case SPEEX_PREPROCESS_GET_AGC_LEVEL:
-      (*(spx_int32_t*)ptr) = st->agc_level;
+      (*(float*)ptr) = st->agc_level;
       break;
 #endif /* #ifndef DISABLE_FLOAT_API */
    case SPEEX_PREPROCESS_SET_AGC_INCREMENT:
@@ -1194,6 +1194,18 @@
    case SPEEX_PREPROCESS_GET_PROB:
       (*(spx_int32_t*)ptr) = MULT16_16_Q15(st->speech_prob, 100);
       break;
+#ifndef DISABLE_FLOAT_API
+   case SPEEX_PREPROCESS_SET_AGC_TARGET:
+      st->agc_level = (*(spx_int32_t*)ptr);
+      if (st->agc_level<1)
+         st->agc_level=1;
+      if (st->agc_level>32768)
+         st->agc_level=32768;
+      break;
+   case SPEEX_PREPROCESS_GET_AGC_TARGET:
+      (*(spx_int32_t*)ptr) = st->agc_level;
+      break;
+#endif /* #ifndef DISABLE_FLOAT_API */
    default:
       speex_warning_int("Unknown speex_preprocess_ctl request: ", request);
       return -1;



More information about the commits mailing list