WebRtcAecm_Process: Reduce code duplication

BUG=
R=bjornv@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/12119004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5930 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
kwiberg@webrtc.org 2014-04-17 12:28:33 +00:00
parent d2f366f28c
commit e57ae02327

View File

@ -443,27 +443,14 @@ int32_t WebRtcAecm_Process(void *aecmInst, const int16_t *nearendNoisy,
// Call the AECM
/*WebRtcAecm_ProcessFrame(aecm->aecmCore, farend, &nearend[FRAME_LEN * i],
&out[FRAME_LEN * i], aecm->knownDelay);*/
if (nearendClean == NULL)
{
if (WebRtcAecm_ProcessFrame(aecm->aecmCore,
farend_ptr,
&nearendNoisy[FRAME_LEN * i],
NULL,
&out[FRAME_LEN * i]) == -1)
{
return -1;
}
} else
{
if (WebRtcAecm_ProcessFrame(aecm->aecmCore,
farend_ptr,
&nearendNoisy[FRAME_LEN * i],
&nearendClean[FRAME_LEN * i],
&out[FRAME_LEN * i]) == -1)
{
return -1;
}
}
if (WebRtcAecm_ProcessFrame(aecm->aecmCore,
farend_ptr,
&nearendNoisy[FRAME_LEN * i],
(nearendClean
? &nearendClean[FRAME_LEN * i]
: NULL),
&out[FRAME_LEN * i]) == -1)
return -1;
}
}