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
This commit is contained in:
parent
4e4b0984da
commit
820f8e9ca7
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user