Only clamp to 16 kHz when AECM is enabled.
Otherwise we could needlessly downsample to 16 kHz (rather than 32 kHz) when HW AEC is used. BUG=3259 R=bjornv@webrtc.org Review URL: https://webrtc-codereview.appspot.com/13429004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6033 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
ff2733204d
commit
e44a84d851
@ -61,12 +61,7 @@ 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.
|
||||
|
@ -1173,7 +1173,12 @@ void TransmitMixer::GenerateAudioFrame(const int16_t* audio,
|
||||
// See: https://code.google.com/p/webrtc/issues/detail?id=3146
|
||||
// When 48 kHz is supported natively by AudioProcessing, this will have
|
||||
// to be changed to handle 44.1 kHz.
|
||||
codec_rate = std::min(codec_rate, kAudioProcMaxNativeSampleRateHz);
|
||||
int max_sample_rate_hz = kAudioProcMaxNativeSampleRateHz;
|
||||
if (audioproc_->echo_control_mobile()->is_enabled()) {
|
||||
// AECM only supports 8 and 16 kHz.
|
||||
max_sample_rate_hz = 16000;
|
||||
}
|
||||
codec_rate = std::min(codec_rate, max_sample_rate_hz);
|
||||
stereo_codec_ = num_codec_channels == 2;
|
||||
|
||||
if (!mono_buffer_.get()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user