[Speex-dev] Obtaining loudness information in 1.2beta2

Jean-Marc Valin jean-marc.valin at usherbrooke.ca
Thu Oct 25 16:45:06 PDT 2007


I'm in favor of the idea, but not of the current implementation. There
are two problems:
1) The st->loudness parameter doesn't represent the amplitude of the
signal, but the amplitude^5 (fifth power). That makes it hard to use
2) The call returns a float, but it should really be an int
(spx_int32_t) so that it can work easily with fixed-point code

There's a last minor thing: instead of SPEEX_PREPROCESS_GET_LOUDNESS, it
should be called SPEEX_PREPROCESS_GET_AGC_LOUDNESS. If you can send me a
patch that addresses these issues, I'll gladly apply it.

	Jean-Marc

Mihai Balea wrote:
> Hi all,
> 
> I'm working on a project called iaxclient
> (http://sourceforge.net/projects/iaxclient).
> We use speex for the majority of our audio processing, including voice
> compression and processing.
> One of the features of iaxclient is Analog AGC, which drives the
> hardware mixer levels based on signal loudness.  Up until 1.2beta1, we
> were able to access the internals of the SpeexPreprocessState structure
> to get loudness information, but, of course, that is no longer possible
> with 1.2beta2.  I would like to propose an addition to the preprocessor
> control interface that exposes that parameter.  I'm attaching a patch
> that contains the proposed change.
> 
> I'm looking forward to any comments and suggestions.
> 
> Cheers,
> Mihai
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Speex-dev mailing list
> Speex-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/speex-dev


More information about the Speex-dev mailing list