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

jm at svn.xiph.org jm at svn.xiph.org
Wed Feb 13 02:11:24 PST 2008


Author: jm
Date: 2008-02-13 02:11:24 -0800 (Wed, 13 Feb 2008)
New Revision: 14494

Modified:
   trunk/speex/include/speex/speex_preprocess.h
   trunk/speex/libspeex/preprocess.c
Log:
Thorvald Natvig: Patch to implement SPEEX_PREPROCESS_GET_AGC_GAIN


Modified: trunk/speex/include/speex/speex_preprocess.h
===================================================================
--- trunk/speex/include/speex/speex_preprocess.h	2008-02-13 09:25:37 UTC (rev 14493)
+++ trunk/speex/include/speex/speex_preprocess.h	2008-02-13 10:11:24 UTC (rev 14494)
@@ -182,6 +182,10 @@
 /** Get loudness */
 #define SPEEX_PREPROCESS_GET_AGC_LOUDNESS 33
 
+/*  Can't set gain */
+/** Get current gain (int32 percent) */
+#define SPEEX_PREPROCESS_GET_AGC_GAIN 35
+
 #ifdef __cplusplus
 }
 #endif

Modified: trunk/speex/libspeex/preprocess.c
===================================================================
--- trunk/speex/libspeex/preprocess.c	2008-02-13 09:25:37 UTC (rev 14493)
+++ trunk/speex/libspeex/preprocess.c	2008-02-13 10:11:24 UTC (rev 14494)
@@ -1175,6 +1175,9 @@
    case SPEEX_PREPROCESS_GET_AGC_LOUDNESS:
       (*(spx_int32_t*)ptr) = pow(st->loudness, 1.0/LOUDNESS_EXP);
       break;
+   case SPEEX_PREPROCESS_GET_AGC_GAIN:
+      (*(spx_int32_t*)ptr) = (spx_int32_t) (st->agc_gain * 100.f);
+      break;
 #endif
 
    default:



More information about the commits mailing list