From 9fbd9ca84915e76f86d988bfa653006aa761ec80 Mon Sep 17 00:00:00 2001 From: "andrew@webrtc.org" Date: Mon, 25 Feb 2013 23:31:56 +0000 Subject: [PATCH] Force a memcpy directly from the AEC ring buffer. Review URL: https://webrtc-codereview.appspot.com/1140004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3570 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/modules/audio_processing/aec/aec_core.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/webrtc/modules/audio_processing/aec/aec_core.c b/webrtc/modules/audio_processing/aec/aec_core.c index 1a22c9e1d..1b747b858 100644 --- a/webrtc/modules/audio_processing/aec/aec_core.c +++ b/webrtc/modules/audio_processing/aec/aec_core.c @@ -601,8 +601,6 @@ void WebRtcAec_ProcessFrame(AecCore* aec, int16_t* out, int16_t* outH) { int out_elements = 0; - int16_t* out_ptr = NULL; - int16_t out_tmp[FRAME_LEN]; // For each frame the process is as follows: // 1) If the system_delay indicates on being too small for processing a @@ -671,12 +669,10 @@ void WebRtcAec_ProcessFrame(AecCore* aec, } } // Obtain an output frame. - WebRtc_ReadBuffer(aec->outFrBuf, (void**) &out_ptr, out_tmp, FRAME_LEN); - memcpy(out, out_ptr, sizeof(int16_t) * FRAME_LEN); + WebRtc_ReadBuffer(aec->outFrBuf, NULL, out, FRAME_LEN); // For H band. if (aec->sampFreq == 32000) { - WebRtc_ReadBuffer(aec->outFrBufH, (void**) &out_ptr, out_tmp, FRAME_LEN); - memcpy(outH, out_ptr, sizeof(int16_t) * FRAME_LEN); + WebRtc_ReadBuffer(aec->outFrBufH, NULL, outH, FRAME_LEN); } }