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

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

Issue 2562593003: Add an optional artificial nearend signal for aecdump call recreation (Closed)
Patch Set: Removed unused variables 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 26 matching lines...) Expand all
37 rtc::Optional<int> output_sample_rate_hz; 37 rtc::Optional<int> output_sample_rate_hz;
38 rtc::Optional<int> output_num_channels; 38 rtc::Optional<int> output_num_channels;
39 rtc::Optional<int> reverse_output_sample_rate_hz; 39 rtc::Optional<int> reverse_output_sample_rate_hz;
40 rtc::Optional<int> reverse_output_num_channels; 40 rtc::Optional<int> reverse_output_num_channels;
41 rtc::Optional<std::string> microphone_positions; 41 rtc::Optional<std::string> microphone_positions;
42 int target_angle_degrees = 90; 42 int target_angle_degrees = 90;
43 rtc::Optional<std::string> output_filename; 43 rtc::Optional<std::string> output_filename;
44 rtc::Optional<std::string> reverse_output_filename; 44 rtc::Optional<std::string> reverse_output_filename;
45 rtc::Optional<std::string> input_filename; 45 rtc::Optional<std::string> input_filename;
46 rtc::Optional<std::string> reverse_input_filename; 46 rtc::Optional<std::string> reverse_input_filename;
47 rtc::Optional<std::string> artificial_nearend_filename;
47 rtc::Optional<bool> use_aec; 48 rtc::Optional<bool> use_aec;
48 rtc::Optional<bool> use_aecm; 49 rtc::Optional<bool> use_aecm;
49 rtc::Optional<bool> use_ed; // Residual Echo Detector. 50 rtc::Optional<bool> use_ed; // Residual Echo Detector.
50 rtc::Optional<std::string> ed_graph_output_filename; 51 rtc::Optional<std::string> ed_graph_output_filename;
51 rtc::Optional<bool> use_agc; 52 rtc::Optional<bool> use_agc;
52 rtc::Optional<bool> use_hpf; 53 rtc::Optional<bool> use_hpf;
53 rtc::Optional<bool> use_ns; 54 rtc::Optional<bool> use_ns;
54 rtc::Optional<bool> use_ts; 55 rtc::Optional<bool> use_ts;
55 rtc::Optional<bool> use_bf; 56 rtc::Optional<bool> use_bf;
56 rtc::Optional<bool> use_ie; 57 rtc::Optional<bool> use_ie;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 int reverse_output_sample_rate_hz, 143 int reverse_output_sample_rate_hz,
143 int input_num_channels, 144 int input_num_channels,
144 int output_num_channels, 145 int output_num_channels,
145 int reverse_input_num_channels, 146 int reverse_input_num_channels,
146 int reverse_output_num_channels); 147 int reverse_output_num_channels);
147 148
148 const SimulationSettings settings_; 149 const SimulationSettings settings_;
149 std::unique_ptr<AudioProcessing> ap_; 150 std::unique_ptr<AudioProcessing> ap_;
150 151
151 std::unique_ptr<ChannelBuffer<float>> in_buf_; 152 std::unique_ptr<ChannelBuffer<float>> in_buf_;
153 std::unique_ptr<ChannelBuffer<float>> artificial_nearend_buf_;
aleloi 2016/12/08 13:00:55 The nearend buffer is only used in the aec-dump-ba
peah-webrtc 2016/12/09 07:19:25 Great point! I move this and artificial_nearend_bu
152 std::unique_ptr<ChannelBuffer<float>> out_buf_; 154 std::unique_ptr<ChannelBuffer<float>> out_buf_;
153 std::unique_ptr<ChannelBuffer<float>> reverse_in_buf_; 155 std::unique_ptr<ChannelBuffer<float>> reverse_in_buf_;
154 std::unique_ptr<ChannelBuffer<float>> reverse_out_buf_; 156 std::unique_ptr<ChannelBuffer<float>> reverse_out_buf_;
155 StreamConfig in_config_; 157 StreamConfig in_config_;
156 StreamConfig out_config_; 158 StreamConfig out_config_;
157 StreamConfig reverse_in_config_; 159 StreamConfig reverse_in_config_;
158 StreamConfig reverse_out_config_; 160 StreamConfig reverse_out_config_;
159 std::unique_ptr<ChannelBufferWavReader> buffer_reader_; 161 std::unique_ptr<ChannelBufferWavReader> buffer_reader_;
162 std::unique_ptr<ChannelBufferWavReader> artificial_nearend_buffer_reader_;
160 std::unique_ptr<ChannelBufferWavReader> reverse_buffer_reader_; 163 std::unique_ptr<ChannelBufferWavReader> reverse_buffer_reader_;
161 AudioFrame rev_frame_; 164 AudioFrame rev_frame_;
162 AudioFrame fwd_frame_; 165 AudioFrame fwd_frame_;
163 bool bitexact_output_ = true; 166 bool bitexact_output_ = true;
164 167
165 private: 168 private:
166 void SetupOutput(); 169 void SetupOutput();
167 170
168 size_t num_process_stream_calls_ = 0; 171 size_t num_process_stream_calls_ = 0;
169 size_t num_reverse_process_stream_calls_ = 0; 172 size_t num_reverse_process_stream_calls_ = 0;
170 size_t output_reset_counter_ = 0; 173 size_t output_reset_counter_ = 0;
171 std::unique_ptr<ChannelBufferWavWriter> buffer_writer_; 174 std::unique_ptr<ChannelBufferWavWriter> buffer_writer_;
172 std::unique_ptr<ChannelBufferWavWriter> reverse_buffer_writer_; 175 std::unique_ptr<ChannelBufferWavWriter> reverse_buffer_writer_;
173 TickIntervalStats proc_time_; 176 TickIntervalStats proc_time_;
174 std::ofstream residual_echo_likelihood_graph_writer_; 177 std::ofstream residual_echo_likelihood_graph_writer_;
175 178
176 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioProcessingSimulator); 179 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioProcessingSimulator);
177 }; 180 };
178 181
179 } // namespace test 182 } // namespace test
180 } // namespace webrtc 183 } // namespace webrtc
181 184
182 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_AUDIO_PROCESSING_SIMULATOR_H_ 185 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_AUDIO_PROCESSING_SIMULATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698