Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / webrtc / modules / audio_processing / aecm / echo_control_mobile.c
index b896de0..088bbf0 100644 (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;
         }
     }