From 0a480cbe4d573e665270cb5b4d4e6d36d0ef9572 Mon Sep 17 00:00:00 2001 From: "bjornv@webrtc.org" Date: Tue, 19 Feb 2013 21:41:27 +0000 Subject: [PATCH] Added getter for far_time_buf in AEC. Only used in AEC debug dump. TEST=audioproc_unittest, trybots BUG=None Review URL: https://webrtc-codereview.appspot.com/1110005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3539 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/modules/audio_processing/aec/aec_core.c | 6 ++++++ webrtc/modules/audio_processing/aec/aec_core.h | 3 +++ webrtc/modules/audio_processing/aec/echo_cancellation.c | 3 ++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/webrtc/modules/audio_processing/aec/aec_core.c b/webrtc/modules/audio_processing/aec/aec_core.c index 39855fda91..19c2be5969 100644 --- a/webrtc/modules/audio_processing/aec/aec_core.c +++ b/webrtc/modules/audio_processing/aec/aec_core.c @@ -735,6 +735,12 @@ void WebRtcAec_GetEchoStats(aec_t* self, Stats* erl, Stats* erle, *erle = self->erle; *a_nlp = self->aNlp; } +#ifdef WEBRTC_AEC_DEBUG_DUMP +void* WebRtcAec_far_time_buf(aec_t* self) { + assert(self != NULL); + return self->far_time_buf; +} +#endif static void ProcessBlock(aec_t* aec) { int i; diff --git a/webrtc/modules/audio_processing/aec/aec_core.h b/webrtc/modules/audio_processing/aec/aec_core.h index 6639265b13..19f99f88d3 100644 --- a/webrtc/modules/audio_processing/aec/aec_core.h +++ b/webrtc/modules/audio_processing/aec/aec_core.h @@ -189,5 +189,8 @@ int WebRtcAec_GetDelayMetricsCore(aec_t* self, int* median, int* std); int WebRtcAec_echo_state(aec_t* self); // Gets statistics of the echo metrics ERL, ERLE, A_NLP. void WebRtcAec_GetEchoStats(aec_t* self, Stats* erl, Stats* erle, Stats* a_nlp); +#ifdef WEBRTC_AEC_DEBUG_DUMP +void* WebRtcAec_far_time_buf(aec_t* self); +#endif #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_MAIN_SOURCE_AEC_CORE_H_ diff --git a/webrtc/modules/audio_processing/aec/echo_cancellation.c b/webrtc/modules/audio_processing/aec/echo_cancellation.c index c7b3e58866..d7d935a301 100644 --- a/webrtc/modules/audio_processing/aec/echo_cancellation.c +++ b/webrtc/modules/audio_processing/aec/echo_cancellation.c @@ -294,7 +294,8 @@ WebRtc_Word32 WebRtcAec_BufferFarend(void *aecInst, const WebRtc_Word16 *farend, #ifdef WEBRTC_AEC_DEBUG_DUMP WebRtc_ReadBuffer(aecpc->far_pre_buf_s16, (void**) &farend_ptr, newFarend, PART_LEN2); - WebRtc_WriteBuffer(aecpc->aec->far_time_buf, &farend_ptr[PART_LEN], 1); + WebRtc_WriteBuffer(WebRtcAec_far_time_buf(aecpc->aec), + &farend_ptr[PART_LEN], 1); WebRtc_MoveReadPtr(aecpc->far_pre_buf_s16, -PART_LEN); #endif }