Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 509 { | 509 { |
| 510 // Pure stereo mode (we are receiving a stereo signal). | 510 // Pure stereo mode (we are receiving a stereo signal). |
| 511 } | 511 } |
| 512 | 512 |
| 513 assert(_audioFrame.num_channels_ == 2); | 513 assert(_audioFrame.num_channels_ == 2); |
| 514 AudioFrameOperations::Scale(_panLeft, _panRight, _audioFrame); | 514 AudioFrameOperations::Scale(_panLeft, _panRight, _audioFrame); |
| 515 } | 515 } |
| 516 | 516 |
| 517 // --- Far-end Voice Quality Enhancement (AudioProcessing Module) | 517 // --- Far-end Voice Quality Enhancement (AudioProcessing Module) |
| 518 if (feed_data_to_apm) { | 518 if (feed_data_to_apm) { |
| 519 // Convert from mixing to AudioProcessing sample rate, similarly to how it | 519 if (_audioProcessingModulePtr->ProcessReverseStream(&_audioFrame) != 0) { |
|
peah-webrtc
2016/03/09 22:07:54
Do we know the implications of this? This changes
peah-webrtc
2016/03/10 10:49:30
After offline discussions: I think this change is
| |
| 520 // is done on the send side. Downmix to mono. | |
| 521 AudioFrame frame; | |
| 522 frame.num_channels_ = 1; | |
| 523 frame.sample_rate_hz_ = _audioProcessingModulePtr->input_sample_rate_hz(); | |
| 524 RemixAndResample(_audioFrame, &audioproc_resampler_, &frame); | |
| 525 | |
| 526 if (_audioProcessingModulePtr->AnalyzeReverseStream(&frame) != 0) { | |
| 527 WEBRTC_TRACE(kTraceWarning, kTraceVoice, VoEId(_instanceId, -1), | 520 WEBRTC_TRACE(kTraceWarning, kTraceVoice, VoEId(_instanceId, -1), |
| 528 "AudioProcessingModule::AnalyzeReverseStream() => error"); | 521 "AudioProcessingModule::AnalyzeReverseStream() => error"); |
| 529 RTC_DCHECK(false); | 522 RTC_DCHECK(false); |
| 530 } | 523 } |
| 531 } | 524 } |
| 532 | 525 |
| 533 // --- External media processing | 526 // --- External media processing |
| 534 { | 527 { |
| 535 rtc::CritScope cs(&_callbackCritSect); | 528 rtc::CritScope cs(&_callbackCritSect); |
| 536 if (_externalMedia) | 529 if (_externalMedia) |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 598 _audioFrame.data_[2 * i + 1] = 0; | 591 _audioFrame.data_[2 * i + 1] = 0; |
| 599 } | 592 } |
| 600 } | 593 } |
| 601 assert(_audioFrame.samples_per_channel_ == toneSamples); | 594 assert(_audioFrame.samples_per_channel_ == toneSamples); |
| 602 | 595 |
| 603 return 0; | 596 return 0; |
| 604 } | 597 } |
| 605 | 598 |
| 606 } // namespace voe | 599 } // namespace voe |
| 607 } // namespace webrtc | 600 } // namespace webrtc |
| OLD | NEW |