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

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

Issue 2444793005: Moved the AECM 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
« no previous file with comments | « webrtc/modules/audio_processing/echo_control_mobile_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 27 matching lines...) Expand all
38 void ProcessOneFrame(int sample_rate_hz, 38 void ProcessOneFrame(int sample_rate_hz,
39 int stream_delay_ms, 39 int stream_delay_ms,
40 AudioBuffer* render_audio_buffer, 40 AudioBuffer* render_audio_buffer,
41 AudioBuffer* capture_audio_buffer, 41 AudioBuffer* capture_audio_buffer,
42 EchoControlMobileImpl* echo_control_mobile) { 42 EchoControlMobileImpl* echo_control_mobile) {
43 if (sample_rate_hz > AudioProcessing::kSampleRate16kHz) { 43 if (sample_rate_hz > AudioProcessing::kSampleRate16kHz) {
44 render_audio_buffer->SplitIntoFrequencyBands(); 44 render_audio_buffer->SplitIntoFrequencyBands();
45 capture_audio_buffer->SplitIntoFrequencyBands(); 45 capture_audio_buffer->SplitIntoFrequencyBands();
46 } 46 }
47 47
48 echo_control_mobile->ProcessRenderAudio(render_audio_buffer); 48 std::vector<int16_t> render_audio;
49 echo_control_mobile->ReadQueuedRenderData(); 49 EchoControlMobileImpl::PackRenderAudioBuffer(
50 render_audio_buffer, 1, render_audio_buffer->num_channels(),
51 &render_audio);
52 echo_control_mobile->ProcessRenderAudio(render_audio);
53
50 echo_control_mobile->ProcessCaptureAudio(capture_audio_buffer, 54 echo_control_mobile->ProcessCaptureAudio(capture_audio_buffer,
51 stream_delay_ms); 55 stream_delay_ms);
52 56
53 if (sample_rate_hz > AudioProcessing::kSampleRate16kHz) { 57 if (sample_rate_hz > AudioProcessing::kSampleRate16kHz) {
54 capture_audio_buffer->MergeFrequencyBands(); 58 capture_audio_buffer->MergeFrequencyBands();
55 } 59 }
56 } 60 }
57 61
58 void RunBitexactnessTest(int sample_rate_hz, 62 void RunBitexactnessTest(int sample_rate_hz,
59 size_t num_channels, 63 size_t num_channels,
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 TEST(EchoControlMobileBitExactnessTest, 215 TEST(EchoControlMobileBitExactnessTest,
212 DISABLED_Mono16kHz_SpeakerPhone_CngOn_StreamDelay0) { 216 DISABLED_Mono16kHz_SpeakerPhone_CngOn_StreamDelay0) {
213 const float kOutputReference[] = {0.003632f, 0.003052f, 0.001984f}; 217 const float kOutputReference[] = {0.003632f, 0.003052f, 0.001984f};
214 218
215 RunBitexactnessTest(16000, 1, 0, 219 RunBitexactnessTest(16000, 1, 0,
216 EchoControlMobile::RoutingMode::kSpeakerphone, true, 220 EchoControlMobile::RoutingMode::kSpeakerphone, true,
217 kOutputReference); 221 kOutputReference);
218 } 222 }
219 223
220 } // namespace webrtc 224 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/echo_control_mobile_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698