Chromium Code Reviews

Unified Diff: webrtc/voice_engine/output_mixer.cc

Issue 1525173002: Bugfix that fixes the integration issue that cause WebRTC AEC mobile to fail (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « webrtc/modules/audio_processing/include/audio_processing.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/voice_engine/output_mixer.cc
diff --git a/webrtc/voice_engine/output_mixer.cc b/webrtc/voice_engine/output_mixer.cc
index d46ee6296d6a946c179641ad41e53f77fa1b8c08..4d280185c3ce26e7dccfbe525c7e4665505a5edc 100644
--- a/webrtc/voice_engine/output_mixer.cc
+++ b/webrtc/voice_engine/output_mixer.cc
@@ -550,9 +550,17 @@ OutputMixer::DoOperationsOnCombinedSignal(bool feed_data_to_apm)
// ----------------------------------------------------------------------------
void OutputMixer::APMProcessReverseStream() {
aluebs-webrtc 2015/12/15 19:16:08 APMAnalyzeReverseStream?
the sun 2015/12/15 19:37:14 If the name is a problem I'd suggest making this c
peah-webrtc 2015/12/15 21:29:45 I decided to keep it since I expected that this CL
peah-webrtc 2015/12/15 21:29:45 Done.
aluebs-webrtc 2015/12/15 21:40:34 Sounds good to me.
- if (_audioProcessingModulePtr->ProcessReverseStream(&_audioFrame) != 0) {
- WEBRTC_TRACE(kTraceError, kTraceVoice, VoEId(_instanceId, -1),
- "AudioProcessingModule::ProcessReverseStream() => error");
+ // Convert from mixing to AudioProcessing sample rate, similarly to how it
+ // is done on the send side. Downmix to mono.
+ AudioFrame frame;
+ frame.num_channels_ = 1;
+ frame.sample_rate_hz_ = _audioProcessingModulePtr->input_sample_rate_hz();
+ RemixAndResample(_audioFrame, &audioproc_resampler_, &frame);
the sun 2015/12/15 19:37:14 What are the expected performance effects of this?
peah-webrtc 2015/12/15 21:29:45 In what sense do you mean? There is a computationa
+
+ if (_audioProcessingModulePtr->AnalyzeReverseStream(&frame) != 0) {
+ WEBRTC_TRACE(kTraceWarning, kTraceVoice, VoEId(_instanceId, -1),
+ "AudioProcessingModule::AnalyzeReverseStream() => error");
+ assert(false);
hlundin-webrtc 2015/12/15 16:07:05 DCHECK
peah-webrtc 2015/12/15 21:29:45 Done.
}
}
« no previous file with comments | « webrtc/modules/audio_processing/include/audio_processing.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine