Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1566)

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: Added missing input_sample_rate_hz() to FakeAudioProcessing Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/voice_engine/output_mixer.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..d3a4f7fc8f98f62c69fbc10c4a4e6d4a45599734 100644
--- a/webrtc/voice_engine/output_mixer.cc
+++ b/webrtc/voice_engine/output_mixer.cc
@@ -517,8 +517,20 @@ OutputMixer::DoOperationsOnCombinedSignal(bool feed_data_to_apm)
}
// --- Far-end Voice Quality Enhancement (AudioProcessing Module)
- if (feed_data_to_apm)
- APMProcessReverseStream();
+ if (feed_data_to_apm) {
+ // 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);
+
+ if (_audioProcessingModulePtr->AnalyzeReverseStream(&frame) != 0) {
+ WEBRTC_TRACE(kTraceWarning, kTraceVoice, VoEId(_instanceId, -1),
+ "AudioProcessingModule::AnalyzeReverseStream() => error");
+ RTC_DCHECK(false);
+ }
+ }
// --- External media processing
{
@@ -549,13 +561,6 @@ OutputMixer::DoOperationsOnCombinedSignal(bool feed_data_to_apm)
// Private methods
// ----------------------------------------------------------------------------
-void OutputMixer::APMProcessReverseStream() {
- if (_audioProcessingModulePtr->ProcessReverseStream(&_audioFrame) != 0) {
- WEBRTC_TRACE(kTraceError, kTraceVoice, VoEId(_instanceId, -1),
- "AudioProcessingModule::ProcessReverseStream() => error");
- }
-}
-
int
OutputMixer::InsertInbandDtmfTone()
{
« no previous file with comments | « webrtc/voice_engine/output_mixer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698