Chromium Code Reviews| 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 | 10 |
| 11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_AUDIO_PROCESSING_SIMULATOR_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_AUDIO_PROCESSING_SIMULATOR_H_ |
| 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_AUDIO_PROCESSING_SIMULATOR_H_ | 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_AUDIO_PROCESSING_SIMULATOR_H_ |
| 13 | 13 |
| 14 #include <algorithm> | 14 #include <algorithm> |
| 15 #include <fstream> | 15 #include <fstream> |
| 16 #include <limits> | 16 #include <limits> |
| 17 #include <memory> | 17 #include <memory> |
| 18 #include <string> | 18 #include <string> |
| 19 | 19 |
| 20 #include "webrtc/common_audio/channel_buffer.h" | 20 #include "webrtc/common_audio/channel_buffer.h" |
| 21 #include "webrtc/modules/audio_processing/include/audio_processing.h" | 21 #include "webrtc/modules/audio_processing/include/audio_processing.h" |
| 22 #include "webrtc/modules/audio_processing/test/fake_recording_device.h" | |
| 22 #include "webrtc/modules/audio_processing/test/test_utils.h" | 23 #include "webrtc/modules/audio_processing/test/test_utils.h" |
| 23 #include "webrtc/rtc_base/constructormagic.h" | 24 #include "webrtc/rtc_base/constructormagic.h" |
| 24 #include "webrtc/rtc_base/optional.h" | 25 #include "webrtc/rtc_base/optional.h" |
| 25 #include "webrtc/rtc_base/task_queue.h" | 26 #include "webrtc/rtc_base/task_queue.h" |
| 26 #include "webrtc/rtc_base/timeutils.h" | 27 #include "webrtc/rtc_base/timeutils.h" |
| 27 | 28 |
| 28 namespace webrtc { | 29 namespace webrtc { |
| 29 namespace test { | 30 namespace test { |
| 30 | 31 |
| 31 // Holds all the parameters available for controlling the simulation. | 32 // Holds all the parameters available for controlling the simulation. |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 69 rtc::Optional<bool> use_experimental_agc; | 70 rtc::Optional<bool> use_experimental_agc; |
| 70 rtc::Optional<int> aecm_routing_mode; | 71 rtc::Optional<int> aecm_routing_mode; |
| 71 rtc::Optional<bool> use_aecm_comfort_noise; | 72 rtc::Optional<bool> use_aecm_comfort_noise; |
| 72 rtc::Optional<int> agc_mode; | 73 rtc::Optional<int> agc_mode; |
| 73 rtc::Optional<int> agc_target_level; | 74 rtc::Optional<int> agc_target_level; |
| 74 rtc::Optional<bool> use_agc_limiter; | 75 rtc::Optional<bool> use_agc_limiter; |
| 75 rtc::Optional<int> agc_compression_gain; | 76 rtc::Optional<int> agc_compression_gain; |
| 76 rtc::Optional<int> vad_likelihood; | 77 rtc::Optional<int> vad_likelihood; |
| 77 rtc::Optional<int> ns_level; | 78 rtc::Optional<int> ns_level; |
| 78 rtc::Optional<bool> use_refined_adaptive_filter; | 79 rtc::Optional<bool> use_refined_adaptive_filter; |
| 80 int initial_mic_level; | |
| 81 bool simulate_mic_gain = false; | |
| 82 rtc::Optional<int> simulated_mic_kind; | |
| 79 bool report_performance = false; | 83 bool report_performance = false; |
| 80 bool report_bitexactness = false; | 84 bool report_bitexactness = false; |
| 81 bool use_verbose_logging = false; | 85 bool use_verbose_logging = false; |
| 82 bool discard_all_settings_in_aecdump = true; | 86 bool discard_all_settings_in_aecdump = true; |
| 83 rtc::Optional<std::string> aec_dump_input_filename; | 87 rtc::Optional<std::string> aec_dump_input_filename; |
| 84 rtc::Optional<std::string> aec_dump_output_filename; | 88 rtc::Optional<std::string> aec_dump_output_filename; |
| 85 bool fixed_interface = false; | 89 bool fixed_interface = false; |
| 86 bool store_intermediate_output = false; | 90 bool store_intermediate_output = false; |
| 87 rtc::Optional<std::string> custom_call_order_filename; | 91 rtc::Optional<std::string> custom_call_order_filename; |
| 88 }; | 92 }; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 159 std::unique_ptr<ChannelBuffer<float>> reverse_out_buf_; | 163 std::unique_ptr<ChannelBuffer<float>> reverse_out_buf_; |
| 160 StreamConfig in_config_; | 164 StreamConfig in_config_; |
| 161 StreamConfig out_config_; | 165 StreamConfig out_config_; |
| 162 StreamConfig reverse_in_config_; | 166 StreamConfig reverse_in_config_; |
| 163 StreamConfig reverse_out_config_; | 167 StreamConfig reverse_out_config_; |
| 164 std::unique_ptr<ChannelBufferWavReader> buffer_reader_; | 168 std::unique_ptr<ChannelBufferWavReader> buffer_reader_; |
| 165 std::unique_ptr<ChannelBufferWavReader> reverse_buffer_reader_; | 169 std::unique_ptr<ChannelBufferWavReader> reverse_buffer_reader_; |
| 166 AudioFrame rev_frame_; | 170 AudioFrame rev_frame_; |
| 167 AudioFrame fwd_frame_; | 171 AudioFrame fwd_frame_; |
| 168 bool bitexact_output_ = true; | 172 bool bitexact_output_ = true; |
| 173 rtc::Optional<int> aec_dump_mic_level_; | |
| 169 | 174 |
| 170 private: | 175 private: |
| 171 void SetupOutput(); | 176 void SetupOutput(); |
| 172 | 177 |
| 173 size_t num_process_stream_calls_ = 0; | 178 size_t num_process_stream_calls_ = 0; |
| 174 size_t num_reverse_process_stream_calls_ = 0; | 179 size_t num_reverse_process_stream_calls_ = 0; |
| 175 size_t output_reset_counter_ = 0; | 180 size_t output_reset_counter_ = 0; |
| 176 std::unique_ptr<ChannelBufferWavWriter> buffer_writer_; | 181 std::unique_ptr<ChannelBufferWavWriter> buffer_writer_; |
| 177 std::unique_ptr<ChannelBufferWavWriter> reverse_buffer_writer_; | 182 std::unique_ptr<ChannelBufferWavWriter> reverse_buffer_writer_; |
| 178 TickIntervalStats proc_time_; | 183 TickIntervalStats proc_time_; |
| 179 std::ofstream residual_echo_likelihood_graph_writer_; | 184 std::ofstream residual_echo_likelihood_graph_writer_; |
| 180 | 185 |
|
peah-webrtc
2017/09/15 09:36:20
Please remove the empty line on 185
AleBzk
2017/09/22 12:33:55
Done.
| |
| 186 int analog_mic_level_; | |
| 187 FakeRecordingDevice fake_recording_device_; | |
| 188 | |
| 181 rtc::TaskQueue worker_queue_; | 189 rtc::TaskQueue worker_queue_; |
| 182 | 190 |
| 183 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioProcessingSimulator); | 191 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioProcessingSimulator); |
| 184 }; | 192 }; |
| 185 | 193 |
| 186 } // namespace test | 194 } // namespace test |
| 187 } // namespace webrtc | 195 } // namespace webrtc |
| 188 | 196 |
| 189 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_AUDIO_PROCESSING_SIMULATOR_H_ | 197 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_AUDIO_PROCESSING_SIMULATOR_H_ |
| OLD | NEW |