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 #include "webrtc/modules/audio_processing/test/wav_based_simulator.h" | 11 #include "webrtc/modules/audio_processing/test/wav_based_simulator.h" |
12 | 12 |
13 #include "webrtc/base/checks.h" | 13 #include "webrtc/base/checks.h" |
14 #include "webrtc/test/testsupport/trace_to_stderr.h" | 14 #include "webrtc/test/testsupport/trace_to_stderr.h" |
15 | 15 |
16 namespace webrtc { | 16 namespace webrtc { |
17 namespace test { | 17 namespace test { |
18 | 18 |
| 19 WavBasedSimulator::WavBasedSimulator(const SimulationSettings& settings) |
| 20 : AudioProcessingSimulator(settings) {} |
| 21 |
| 22 WavBasedSimulator::~WavBasedSimulator() = default; |
| 23 |
19 std::vector<WavBasedSimulator::SimulationEventType> | 24 std::vector<WavBasedSimulator::SimulationEventType> |
20 WavBasedSimulator::GetDefaultEventChain() const { | 25 WavBasedSimulator::GetDefaultEventChain() const { |
21 std::vector<WavBasedSimulator::SimulationEventType> call_chain(2); | 26 std::vector<WavBasedSimulator::SimulationEventType> call_chain(2); |
22 call_chain[0] = SimulationEventType::kProcessStream; | 27 call_chain[0] = SimulationEventType::kProcessStream; |
23 call_chain[1] = SimulationEventType::kProcessReverseStream; | 28 call_chain[1] = SimulationEventType::kProcessReverseStream; |
24 return call_chain; | 29 return call_chain; |
25 } | 30 } |
26 | 31 |
27 void WavBasedSimulator::PrepareProcessStreamCall() { | 32 void WavBasedSimulator::PrepareProcessStreamCall() { |
28 if (settings_.fixed_interface) { | 33 if (settings_.fixed_interface) { |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 } | 152 } |
148 | 153 |
149 SetupBuffersConfigsOutputs( | 154 SetupBuffersConfigsOutputs( |
150 input_sample_rate_hz, output_sample_rate_hz, reverse_sample_rate_hz, | 155 input_sample_rate_hz, output_sample_rate_hz, reverse_sample_rate_hz, |
151 reverse_output_sample_rate_hz, input_num_channels, output_num_channels, | 156 reverse_output_sample_rate_hz, input_num_channels, output_num_channels, |
152 reverse_num_channels, reverse_output_num_channels); | 157 reverse_num_channels, reverse_output_num_channels); |
153 } | 158 } |
154 | 159 |
155 } // namespace test | 160 } // namespace test |
156 } // namespace webrtc | 161 } // namespace webrtc |
OLD | NEW |