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

jm at svn.xiph.org jm at svn.xiph.org
Tue Oct 30 01:57:58 PDT 2007


Author: jm
Date: 2007-10-30 01:57:58 -0700 (Tue, 30 Oct 2007)
New Revision: 14064

Modified:
   trunk/speex/include/speex/speex_preprocess.h
   trunk/speex/libspeex/preprocess.c
Log:
SPEEX_PREPROCESS_GET_AGC_LOUDNESS patch by Mihai Balea


Modified: trunk/speex/include/speex/speex_preprocess.h
===================================================================
--- trunk/speex/include/speex/speex_preprocess.h	2007-10-30 00:15:15 UTC (rev 14063)
+++ trunk/speex/include/speex/speex_preprocess.h	2007-10-30 08:57:58 UTC (rev 14064)
@@ -178,6 +178,10 @@
 /** Get maximal gain in dB (int32) */
 #define SPEEX_PREPROCESS_GET_AGC_MAX_GAIN 31
 
+/*  Can't set loudness */
+/** Get loudness */
+#define SPEEX_PREPROCESS_GET_AGC_LOUDNESS 33
+
 #ifdef __cplusplus
 }
 #endif

Modified: trunk/speex/libspeex/preprocess.c
===================================================================
--- trunk/speex/libspeex/preprocess.c	2007-10-30 00:15:15 UTC (rev 14063)
+++ trunk/speex/libspeex/preprocess.c	2007-10-30 08:57:58 UTC (rev 14064)
@@ -1166,6 +1166,9 @@
    case SPEEX_PREPROCESS_GET_ECHO_STATE:
       ptr = (void*)st->echo_state;
       break;
+   case SPEEX_PREPROCESS_GET_AGC_LOUDNESS:
+      (*(spx_int32_t*)ptr) = pow(st->loudness, 1.0/LOUDNESS_EXP);
+      break;
 
    default:
       speex_warning_int("Unknown speex_preprocess_ctl request: ", request);



More information about the commits mailing list