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

Side by Side Diff: webrtc/modules/audio_processing/test/audio_processing_simulator.cc

Issue 2562593003: Add an optional artificial nearend signal for aecdump call recreation (Closed)
Patch Set: Created 4 years 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 10
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 int reverse_output_sample_rate_hz, 158 int reverse_output_sample_rate_hz,
159 int input_num_channels, 159 int input_num_channels,
160 int output_num_channels, 160 int output_num_channels,
161 int reverse_input_num_channels, 161 int reverse_input_num_channels,
162 int reverse_output_num_channels) { 162 int reverse_output_num_channels) {
163 in_config_ = StreamConfig(input_sample_rate_hz, input_num_channels); 163 in_config_ = StreamConfig(input_sample_rate_hz, input_num_channels);
164 in_buf_.reset(new ChannelBuffer<float>( 164 in_buf_.reset(new ChannelBuffer<float>(
165 rtc::CheckedDivExact(input_sample_rate_hz, kChunksPerSecond), 165 rtc::CheckedDivExact(input_sample_rate_hz, kChunksPerSecond),
166 input_num_channels)); 166 input_num_channels));
167 167
168 artificial_nearend_buf_.reset(new ChannelBuffer<float>(
169 rtc::CheckedDivExact(input_sample_rate_hz, kChunksPerSecond), 1));
170
168 reverse_in_config_ = 171 reverse_in_config_ =
169 StreamConfig(reverse_input_sample_rate_hz, reverse_input_num_channels); 172 StreamConfig(reverse_input_sample_rate_hz, reverse_input_num_channels);
170 reverse_in_buf_.reset(new ChannelBuffer<float>( 173 reverse_in_buf_.reset(new ChannelBuffer<float>(
171 rtc::CheckedDivExact(reverse_input_sample_rate_hz, kChunksPerSecond), 174 rtc::CheckedDivExact(reverse_input_sample_rate_hz, kChunksPerSecond),
172 reverse_input_num_channels)); 175 reverse_input_num_channels));
173 176
174 out_config_ = StreamConfig(output_sample_rate_hz, output_num_channels); 177 out_config_ = StreamConfig(output_sample_rate_hz, output_num_channels);
175 out_buf_.reset(new ChannelBuffer<float>( 178 out_buf_.reset(new ChannelBuffer<float>(
176 rtc::CheckedDivExact(output_sample_rate_hz, kChunksPerSecond), 179 rtc::CheckedDivExact(output_sample_rate_hz, kChunksPerSecond),
177 output_num_channels)); 180 output_num_channels));
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 size_t kMaxFilenameSize = AudioProcessing::kMaxFilenameSize; 385 size_t kMaxFilenameSize = AudioProcessing::kMaxFilenameSize;
383 RTC_CHECK_LE(settings_.aec_dump_output_filename->size(), kMaxFilenameSize); 386 RTC_CHECK_LE(settings_.aec_dump_output_filename->size(), kMaxFilenameSize);
384 RTC_CHECK_EQ(AudioProcessing::kNoError, 387 RTC_CHECK_EQ(AudioProcessing::kNoError,
385 ap_->StartDebugRecording( 388 ap_->StartDebugRecording(
386 settings_.aec_dump_output_filename->c_str(), -1)); 389 settings_.aec_dump_output_filename->c_str(), -1));
387 } 390 }
388 } 391 }
389 392
390 } // namespace test 393 } // namespace test
391 } // namespace webrtc 394 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698