| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 #include <vector> | 10 #include <vector> |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 bool drift_compensation_enabled, | 42 bool drift_compensation_enabled, |
| 43 int stream_drift_samples, | 43 int stream_drift_samples, |
| 44 AudioBuffer* render_audio_buffer, | 44 AudioBuffer* render_audio_buffer, |
| 45 AudioBuffer* capture_audio_buffer, | 45 AudioBuffer* capture_audio_buffer, |
| 46 EchoCancellationImpl* echo_canceller) { | 46 EchoCancellationImpl* echo_canceller) { |
| 47 if (sample_rate_hz > AudioProcessing::kSampleRate16kHz) { | 47 if (sample_rate_hz > AudioProcessing::kSampleRate16kHz) { |
| 48 render_audio_buffer->SplitIntoFrequencyBands(); | 48 render_audio_buffer->SplitIntoFrequencyBands(); |
| 49 capture_audio_buffer->SplitIntoFrequencyBands(); | 49 capture_audio_buffer->SplitIntoFrequencyBands(); |
| 50 } | 50 } |
| 51 | 51 |
| 52 echo_canceller->ProcessRenderAudio(render_audio_buffer); | 52 std::vector<float> render_audio; |
| 53 EchoCancellationImpl::PackRenderAudioBuffer( |
| 54 render_audio_buffer, 1, render_audio_buffer->num_channels(), |
| 55 &render_audio); |
| 56 echo_canceller->ProcessRenderAudio(render_audio); |
| 53 | 57 |
| 54 if (drift_compensation_enabled) { | 58 if (drift_compensation_enabled) { |
| 55 static_cast<EchoCancellation*>(echo_canceller) | 59 static_cast<EchoCancellation*>(echo_canceller) |
| 56 ->set_stream_drift_samples(stream_drift_samples); | 60 ->set_stream_drift_samples(stream_drift_samples); |
| 57 } | 61 } |
| 58 | 62 |
| 59 echo_canceller->ProcessCaptureAudio(capture_audio_buffer, stream_delay_ms); | 63 echo_canceller->ProcessCaptureAudio(capture_audio_buffer, stream_delay_ms); |
| 60 | 64 |
| 61 if (sample_rate_hz > AudioProcessing::kSampleRate16kHz) { | 65 if (sample_rate_hz > AudioProcessing::kSampleRate16kHz) { |
| 62 capture_audio_buffer->MergeFrequencyBands(); | 66 capture_audio_buffer->MergeFrequencyBands(); |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 DISABLED_Stereo48kHz_HighLevel_NoDrift_StreamDelay0) { | 334 DISABLED_Stereo48kHz_HighLevel_NoDrift_StreamDelay0) { |
| 331 #endif | 335 #endif |
| 332 const float kOutputReference[] = {-0.003500f, -0.001894f, -0.003176f, | 336 const float kOutputReference[] = {-0.003500f, -0.001894f, -0.003176f, |
| 333 -0.003500f, -0.001894f, -0.003176f}; | 337 -0.003500f, -0.001894f, -0.003176f}; |
| 334 RunBitexactnessTest(48000, 2, 0, false, 0, | 338 RunBitexactnessTest(48000, 2, 0, false, 0, |
| 335 EchoCancellation::SuppressionLevel::kHighSuppression, | 339 EchoCancellation::SuppressionLevel::kHighSuppression, |
| 336 kStreamHasEchoReference, kOutputReference); | 340 kStreamHasEchoReference, kOutputReference); |
| 337 } | 341 } |
| 338 | 342 |
| 339 } // namespace webrtc | 343 } // namespace webrtc |
| OLD | NEW |