From: <sb...@us...> - 2007-11-07 15:43:18
|
Revision: 1271 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1271&view=rev Author: sbalea Date: 2007-11-07 07:43:16 -0800 (Wed, 07 Nov 2007) Log Message: ----------- Speex changed its interface to VAD probabilities. In early 1.1 dev versions VAD probabilities were floats. In 1.2beta1, the probabilities are 32 bit ints. Iaxclient still passed pointers to floats as arguments, and this forced speex to use its built in defaults. In effect our VAD probability tweaks did nothing. This change attempts to fix this by converting VAD probability arguments to 32 bit integers ranging from 0 to 100. Modified Paths: -------------- trunk/lib/audio_encode.c Modified: trunk/lib/audio_encode.c =================================================================== --- trunk/lib/audio_encode.c 2007-11-06 18:29:21 UTC (rev 1270) +++ trunk/lib/audio_encode.c 2007-11-07 15:43:16 UTC (rev 1271) @@ -94,7 +94,6 @@ static void set_speex_filters() { int i; - float f; if ( !st ) return; @@ -107,10 +106,10 @@ speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DENOISE, &i); /* make vad more sensitive */ - f = 0.30f; - speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_PROB_START, &f); - f = 0.07f; - speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_PROB_CONTINUE, &f); + i = 30; + speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_PROB_START, &i); + i = 7; + speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_PROB_CONTINUE, &i); } static void calculate_level(short *audio, int len, float *level) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |