| 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 <limits> | 16 #include <limits> |
| 16 #include <memory> | 17 #include <memory> |
| 17 #include <string> | 18 #include <string> |
| 18 | 19 |
| 19 #include "webrtc/base/timeutils.h" | 20 #include "webrtc/base/timeutils.h" |
| 20 #include "webrtc/base/constructormagic.h" | 21 #include "webrtc/base/constructormagic.h" |
| 21 #include "webrtc/base/optional.h" | 22 #include "webrtc/base/optional.h" |
| 22 #include "webrtc/common_audio/channel_buffer.h" | 23 #include "webrtc/common_audio/channel_buffer.h" |
| 23 #include "webrtc/modules/audio_processing/include/audio_processing.h" | 24 #include "webrtc/modules/audio_processing/include/audio_processing.h" |
| 24 #include "webrtc/modules/audio_processing/test/test_utils.h" | 25 #include "webrtc/modules/audio_processing/test/test_utils.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 38 rtc::Optional<int> reverse_output_sample_rate_hz; | 39 rtc::Optional<int> reverse_output_sample_rate_hz; |
| 39 rtc::Optional<int> reverse_output_num_channels; | 40 rtc::Optional<int> reverse_output_num_channels; |
| 40 rtc::Optional<std::string> microphone_positions; | 41 rtc::Optional<std::string> microphone_positions; |
| 41 int target_angle_degrees = 90; | 42 int target_angle_degrees = 90; |
| 42 rtc::Optional<std::string> output_filename; | 43 rtc::Optional<std::string> output_filename; |
| 43 rtc::Optional<std::string> reverse_output_filename; | 44 rtc::Optional<std::string> reverse_output_filename; |
| 44 rtc::Optional<std::string> input_filename; | 45 rtc::Optional<std::string> input_filename; |
| 45 rtc::Optional<std::string> reverse_input_filename; | 46 rtc::Optional<std::string> reverse_input_filename; |
| 46 rtc::Optional<bool> use_aec; | 47 rtc::Optional<bool> use_aec; |
| 47 rtc::Optional<bool> use_aecm; | 48 rtc::Optional<bool> use_aecm; |
| 49 rtc::Optional<bool> use_red; // Residual Echo Detector. |
| 50 rtc::Optional<std::string> red_graph_output_filename; |
| 48 rtc::Optional<bool> use_agc; | 51 rtc::Optional<bool> use_agc; |
| 49 rtc::Optional<bool> use_hpf; | 52 rtc::Optional<bool> use_hpf; |
| 50 rtc::Optional<bool> use_ns; | 53 rtc::Optional<bool> use_ns; |
| 51 rtc::Optional<bool> use_ts; | 54 rtc::Optional<bool> use_ts; |
| 52 rtc::Optional<bool> use_bf; | 55 rtc::Optional<bool> use_bf; |
| 53 rtc::Optional<bool> use_ie; | 56 rtc::Optional<bool> use_ie; |
| 54 rtc::Optional<bool> use_vad; | 57 rtc::Optional<bool> use_vad; |
| 55 rtc::Optional<bool> use_le; | 58 rtc::Optional<bool> use_le; |
| 56 rtc::Optional<bool> use_all; | 59 rtc::Optional<bool> use_all; |
| 57 rtc::Optional<int> aec_suppression_level; | 60 rtc::Optional<int> aec_suppression_level; |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 164 |
| 162 private: | 165 private: |
| 163 void SetupOutput(); | 166 void SetupOutput(); |
| 164 | 167 |
| 165 size_t num_process_stream_calls_ = 0; | 168 size_t num_process_stream_calls_ = 0; |
| 166 size_t num_reverse_process_stream_calls_ = 0; | 169 size_t num_reverse_process_stream_calls_ = 0; |
| 167 size_t output_reset_counter_ = 0; | 170 size_t output_reset_counter_ = 0; |
| 168 std::unique_ptr<ChannelBufferWavWriter> buffer_writer_; | 171 std::unique_ptr<ChannelBufferWavWriter> buffer_writer_; |
| 169 std::unique_ptr<ChannelBufferWavWriter> reverse_buffer_writer_; | 172 std::unique_ptr<ChannelBufferWavWriter> reverse_buffer_writer_; |
| 170 TickIntervalStats proc_time_; | 173 TickIntervalStats proc_time_; |
| 174 std::ofstream residual_echo_likelihood_graph_writer_; |
| 171 | 175 |
| 172 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioProcessingSimulator); | 176 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioProcessingSimulator); |
| 173 }; | 177 }; |
| 174 | 178 |
| 175 } // namespace test | 179 } // namespace test |
| 176 } // namespace webrtc | 180 } // namespace webrtc |
| 177 | 181 |
| 178 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_AUDIO_PROCESSING_SIMULATOR_H_ | 182 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_AUDIO_PROCESSING_SIMULATOR_H_ |
| OLD | NEW |