mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-31 10:19:23 +00:00
denoise only sound cards input on pin 0
just use vad on incoming RTP streams git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@189 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
This commit is contained in:
parent
01617eae53
commit
8a8e2b5237
1 changed files with 9 additions and 2 deletions
|
|
@ -80,7 +80,10 @@ static void channel_init(ConfState *s, Channel *chan, int pos){
|
|||
if (chan->speex_pp!=NULL) {
|
||||
float f;
|
||||
int val;
|
||||
val=1;
|
||||
if (pos==0)
|
||||
val=1;
|
||||
else
|
||||
val=0;
|
||||
speex_preprocess_ctl(chan->speex_pp, SPEEX_PREPROCESS_SET_DENOISE, &val);
|
||||
/* enable VAD only on incoming RTP stream */
|
||||
if (pos%2==1)
|
||||
|
|
@ -289,11 +292,15 @@ static void conf_sum(ConfState *s){
|
|||
{
|
||||
ms_bufferizer_read(&chan->buff,(uint8_t*)chan->input,s->conf_gran);
|
||||
#ifndef DISABLE_SPEEX
|
||||
if (chan->speex_pp!=NULL && s->enable_vad==TRUE)
|
||||
if (chan->speex_pp!=NULL && s->enable_vad==TRUE && i==0)
|
||||
{
|
||||
int vad;
|
||||
vad = speex_preprocess(chan->speex_pp, (short*)chan->input, NULL);
|
||||
}
|
||||
else if (chan->speex_pp!=NULL && s->enable_vad==TRUE)
|
||||
{
|
||||
speex_preprocess_estimate_update(chan->speex_pp, (short*)chan->input);
|
||||
}
|
||||
#endif
|
||||
|
||||
for(j=0;j<s->conf_nsamples;++j){
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue