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 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 579 // side. Downmix to mono. | 579 // side. Downmix to mono. |
| 580 AudioFrame frame; | 580 AudioFrame frame; |
| 581 frame.num_channels_ = 1; | 581 frame.num_channels_ = 1; |
| 582 frame.sample_rate_hz_ = _audioProcessingModulePtr->input_sample_rate_hz(); | 582 frame.sample_rate_hz_ = _audioProcessingModulePtr->input_sample_rate_hz(); |
| 583 RemixAndResample(_audioFrame, &audioproc_resampler_, &frame); | 583 RemixAndResample(_audioFrame, &audioproc_resampler_, &frame); |
| 584 | 584 |
| 585 if (_audioProcessingModulePtr->AnalyzeReverseStream(&frame) == -1) { | 585 if (_audioProcessingModulePtr->AnalyzeReverseStream(&frame) == -1) { |
| 586 WEBRTC_TRACE(kTraceWarning, kTraceVoice, VoEId(_instanceId,-1), | 586 WEBRTC_TRACE(kTraceWarning, kTraceVoice, VoEId(_instanceId,-1), |
| 587 "AudioProcessingModule::AnalyzeReverseStream() => error"); | 587 "AudioProcessingModule::AnalyzeReverseStream() => error"); |
| 588 } | 588 } |
| 589 RemixAndResample(frame, &audioproc_resampler_, &_audioFrame); | |
|
Andrew MacDonald
2015/07/24 23:50:40
This is a big deal ;) First, you can't use the sam
ekm
2015/07/29 00:37:19
Done (1st option): added support in InterleaveTo i
| |
| 589 } | 590 } |
| 590 | 591 |
| 591 int | 592 int |
| 592 OutputMixer::InsertInbandDtmfTone() | 593 OutputMixer::InsertInbandDtmfTone() |
| 593 { | 594 { |
| 594 uint16_t sampleRate(0); | 595 uint16_t sampleRate(0); |
| 595 _dtmfGenerator.GetSampleRate(sampleRate); | 596 _dtmfGenerator.GetSampleRate(sampleRate); |
| 596 if (sampleRate != _audioFrame.sample_rate_hz_) | 597 if (sampleRate != _audioFrame.sample_rate_hz_) |
| 597 { | 598 { |
| 598 // Update sample rate of Dtmf tone since the mixing frequency changed. | 599 // Update sample rate of Dtmf tone since the mixing frequency changed. |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 627 _audioFrame.data_[2 * i + 1] = 0; | 628 _audioFrame.data_[2 * i + 1] = 0; |
| 628 } | 629 } |
| 629 } | 630 } |
| 630 assert(_audioFrame.samples_per_channel_ == toneSamples); | 631 assert(_audioFrame.samples_per_channel_ == toneSamples); |
| 631 | 632 |
| 632 return 0; | 633 return 0; |
| 633 } | 634 } |
| 634 | 635 |
| 635 } // namespace voe | 636 } // namespace voe |
| 636 } // namespace webrtc | 637 } // namespace webrtc |
| OLD | NEW |