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

Side by Side Diff: webrtc/modules/audio_processing/echo_cancellation_bit_exact_unittest.cc

Issue 2427553003: Moved the AEC render sample queue into the audio processing module (Closed)
Patch Set: Rebase Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
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
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 echo_canceller->ReadQueuedRenderData(); 53 EchoCancellationImpl::PackRenderAudioBuffer(
54 render_audio_buffer, 1, render_audio_buffer->num_channels(),
55 &render_audio);
56 echo_canceller->ProcessRenderAudio(render_audio);
54 57
55 if (drift_compensation_enabled) { 58 if (drift_compensation_enabled) {
56 static_cast<EchoCancellation*>(echo_canceller) 59 static_cast<EchoCancellation*>(echo_canceller)
57 ->set_stream_drift_samples(stream_drift_samples); 60 ->set_stream_drift_samples(stream_drift_samples);
58 } 61 }
59 62
60 echo_canceller->ProcessCaptureAudio(capture_audio_buffer, stream_delay_ms); 63 echo_canceller->ProcessCaptureAudio(capture_audio_buffer, stream_delay_ms);
61 64
62 if (sample_rate_hz > AudioProcessing::kSampleRate16kHz) { 65 if (sample_rate_hz > AudioProcessing::kSampleRate16kHz) {
63 capture_audio_buffer->MergeFrequencyBands(); 66 capture_audio_buffer->MergeFrequencyBands();
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 DISABLED_Stereo48kHz_HighLevel_NoDrift_StreamDelay0) { 348 DISABLED_Stereo48kHz_HighLevel_NoDrift_StreamDelay0) {
346 #endif 349 #endif
347 const float kOutputReference[] = {-0.001101f, -0.001101f, -0.000449f, 350 const float kOutputReference[] = {-0.001101f, -0.001101f, -0.000449f,
348 -0.001101f, -0.001101f, -0.000449f}; 351 -0.001101f, -0.001101f, -0.000449f};
349 RunBitexactnessTest(48000, 2, 0, false, 0, 352 RunBitexactnessTest(48000, 2, 0, false, 0,
350 EchoCancellation::SuppressionLevel::kHighSuppression, 353 EchoCancellation::SuppressionLevel::kHighSuppression,
351 kStreamHasEchoReference, kOutputReference); 354 kStreamHasEchoReference, kOutputReference);
352 } 355 }
353 356
354 } // namespace webrtc 357 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/audio_processing_impl.cc ('k') | webrtc/modules/audio_processing/echo_cancellation_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698