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 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 568 _audioLevel.ComputeLevel(_audioFrame); | 568 _audioLevel.ComputeLevel(_audioFrame); |
| 569 | 569 |
| 570 return 0; | 570 return 0; |
| 571 } | 571 } |
| 572 | 572 |
| 573 // ---------------------------------------------------------------------------- | 573 // ---------------------------------------------------------------------------- |
| 574 // Private methods | 574 // Private methods |
| 575 // ---------------------------------------------------------------------------- | 575 // ---------------------------------------------------------------------------- |
| 576 | 576 |
| 577 void OutputMixer::APMAnalyzeReverseStream() { | 577 void OutputMixer::APMAnalyzeReverseStream() { |
| 578 // Convert from mixing to AudioProcessing sample rate, determined by the send | 578 if (_audioProcessingModulePtr->AnalyzeReverseStream(&_audioFrame) == -1) { |
|
Andrew MacDonald
2015/07/29 03:52:28
Can you run through a bunch of codecs in voe_cmd_t
ekm
2015/07/29 23:35:06
Tried a bunch on loopback. AEC is effective for al
Andrew MacDonald
2015/07/30 03:53:16
Hmm, OK, I'll try it once this lands.
ekm
2015/07/30 06:15:18
Acknowledged.
| |
| 579 // side. Downmix to mono. | |
| 580 AudioFrame frame; | |
| 581 frame.num_channels_ = 1; | |
| 582 frame.sample_rate_hz_ = _audioProcessingModulePtr->input_sample_rate_hz(); | |
| 583 RemixAndResample(_audioFrame, &audioproc_resampler_, &frame); | |
| 584 | |
| 585 if (_audioProcessingModulePtr->AnalyzeReverseStream(&frame) == -1) { | |
| 586 WEBRTC_TRACE(kTraceWarning, kTraceVoice, VoEId(_instanceId,-1), | 579 WEBRTC_TRACE(kTraceWarning, kTraceVoice, VoEId(_instanceId,-1), |
| 587 "AudioProcessingModule::AnalyzeReverseStream() => error"); | 580 "AudioProcessingModule::AnalyzeReverseStream() => error"); |
| 588 } | 581 } |
| 589 } | 582 } |
| 590 | 583 |
| 591 int | 584 int |
| 592 OutputMixer::InsertInbandDtmfTone() | 585 OutputMixer::InsertInbandDtmfTone() |
| 593 { | 586 { |
| 594 uint16_t sampleRate(0); | 587 uint16_t sampleRate(0); |
| 595 _dtmfGenerator.GetSampleRate(sampleRate); | 588 _dtmfGenerator.GetSampleRate(sampleRate); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 627 _audioFrame.data_[2 * i + 1] = 0; | 620 _audioFrame.data_[2 * i + 1] = 0; |
| 628 } | 621 } |
| 629 } | 622 } |
| 630 assert(_audioFrame.samples_per_channel_ == toneSamples); | 623 assert(_audioFrame.samples_per_channel_ == toneSamples); |
| 631 | 624 |
| 632 return 0; | 625 return 0; |
| 633 } | 626 } |
| 634 | 627 |
| 635 } // namespace voe | 628 } // namespace voe |
| 636 } // namespace webrtc | 629 } // namespace webrtc |
| OLD | NEW |