From 820f8e9ca7dddeef909cadb9411264942fba9dcb Mon Sep 17 00:00:00 2001 From: "bjornv@webrtc.org" Date: Mon, 11 Aug 2014 15:39:00 +0000 Subject: [PATCH] modules/audio_processing: Moves declaration of kDelayDiffOffsetSamples audio_processing did not compile when aec_untrusted_delay_for_testing=1 was set. The constant kDelayDiffOffsetSamples was declared only for Mac when WEBRTC_UNTRUSTED_DELAY was automatically turned on. Moving the declaration outside the ifdef makes it build with the flag on for any platform. BUG=3673 TESTED=locally and trybots R=andrew@webrtc.org Review URL: https://webrtc-codereview.appspot.com/22049004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6866 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/modules/audio_processing/aec/echo_cancellation.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/webrtc/modules/audio_processing/aec/echo_cancellation.c b/webrtc/modules/audio_processing/aec/echo_cancellation.c index b58edcbbe..722196656 100644 --- a/webrtc/modules/audio_processing/aec/echo_cancellation.c +++ b/webrtc/modules/audio_processing/aec/echo_cancellation.c @@ -66,14 +66,14 @@ // GTP/Linux(ChromeOS): TBD, but for the moment we will trust the values. #if defined(WEBRTC_CHROMIUM_BUILD) && defined(WEBRTC_MAC) #define WEBRTC_UNTRUSTED_DELAY +#endif -#if defined(WEBRTC_MAC) +#if defined(WEBRTC_UNTRUSTED_DELAY) && defined(WEBRTC_MAC) static const int kDelayDiffOffsetSamples = -160; #else // Not enabled for now. static const int kDelayDiffOffsetSamples = 0; #endif -#endif #if defined(WEBRTC_MAC) static const int kFixedDelayMs = 20; @@ -790,12 +790,11 @@ static void ProcessExtended(aecpc_t* self, int32_t skew) { int i; const int num_frames = num_samples / FRAME_LEN; -#if defined(WEBRTC_UNTRUSTED_DELAY) const int delay_diff_offset = kDelayDiffOffsetSamples; +#if defined(WEBRTC_UNTRUSTED_DELAY) reported_delay_ms = kFixedDelayMs; #else // This is the usual mode where we trust the reported system delay values. - const int delay_diff_offset = 0; // Due to the longer filter, we no longer add 10 ms to the reported delay // to reduce chance of non-causality. Instead we apply a minimum here to avoid // issues with the read pointer jumping around needlessly.