[Speex-dev] iaxclient & speex
David Brazier
david.brazier at 360crm.co.uk
Thu May 3 05:25:42 PDT 2007
Hi
The latest SVN trunk for speex has changed the SpeexPreprocessState to
an opaque structure, for jolly good software engineering reasons.
However, the Analogue AGC (AAGC) feature of iaxclient (in audio_enode.c)
relies on some members of this. It uses speech_prob to detect when
there is enough speech to consider AAGC and then loudness2 to decide how
to adjust the input mixer. We want to use the latest speex, for echo
cancellation and other reasons, so I tried just making
SpeexPreprocessState visible again, but it turns out neither of these
members are present in the new SpeexPreprocessState_ structure anyway.
I was able to re-create the speech_prob member by setting it from Pframe
before speex_preprocess_run returns, and I've used agc_gain as the basis
for adjusting the mixer (i.e. if agc_gain is high, the input is low, so
turn the mixer up and v.v.). This appears to be effective.
So is there a way to make these items available to speex clients? The
speex_preprocess_ctl interface could be extended, but it's not really
what it is intended for, is it?
Also, can anyone clarify the new use of speex_preprocess_ctl for
SPEEX_PREPROCESS_SET_PROB_START/CONTINUE? It used to have a float
parameter, and it now seems to be int, but I couldn't get it to set the
value correctly and have had to change speex_preprocess_ctl back to
using a float.
David
More information about the Speex-dev
mailing list