From 82a045aae0aec1b8133a98dba0a3db76e1bfaf9d Mon Sep 17 00:00:00 2001 From: "fischman@webrtc.org" Date: Mon, 28 Apr 2014 17:26:32 +0000 Subject: [PATCH] APM: limit native sample rate to 16kHz on mobile. Required by AECM which assert-fails on higher sample rates. BUG=3259 R=andrew@webrtc.org Review URL: https://webrtc-codereview.appspot.com/21369005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6002 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/modules/audio_processing/include/audio_processing.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/webrtc/modules/audio_processing/include/audio_processing.h b/webrtc/modules/audio_processing/include/audio_processing.h index 6db1d12bc0..68b679d66a 100644 --- a/webrtc/modules/audio_processing/include/audio_processing.h +++ b/webrtc/modules/audio_processing/include/audio_processing.h @@ -61,7 +61,12 @@ struct ExperimentalAgc { bool enabled; }; +#if defined(ANDROID) || defined(IOS) +// AECM only supports 8kHz & 16kHz. +static const int kAudioProcMaxNativeSampleRateHz = 16000; +#else static const int kAudioProcMaxNativeSampleRateHz = 32000; +#endif // The Audio Processing Module (APM) provides a collection of voice processing // components designed for real-time communications software.