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 |
(...skipping 82 matching lines...) Loading... |
93 } | 93 } |
94 | 94 |
95 DestroyAudioProcessor(); | 95 DestroyAudioProcessor(); |
96 } | 96 } |
97 | 97 |
98 bool WavBasedSimulator::HandleProcessStreamCall() { | 98 bool WavBasedSimulator::HandleProcessStreamCall() { |
99 bool samples_left_to_process = buffer_reader_->Read(in_buf_.get()); | 99 bool samples_left_to_process = buffer_reader_->Read(in_buf_.get()); |
100 if (samples_left_to_process) { | 100 if (samples_left_to_process) { |
101 PrepareProcessStreamCall(); | 101 PrepareProcessStreamCall(); |
102 ProcessStream(settings_.fixed_interface); | 102 ProcessStream(settings_.fixed_interface); |
| 103 // Call stream analog level to ensure that any side-effects are triggered. |
| 104 (void)ap_->gain_control()->stream_analog_level(); |
103 last_specified_microphone_level_ = | 105 last_specified_microphone_level_ = |
104 ap_->gain_control()->stream_analog_level(); | 106 ap_->gain_control()->stream_analog_level(); |
105 } | 107 } |
106 return samples_left_to_process; | 108 return samples_left_to_process; |
107 } | 109 } |
108 | 110 |
109 bool WavBasedSimulator::HandleProcessReverseStreamCall() { | 111 bool WavBasedSimulator::HandleProcessReverseStreamCall() { |
110 bool samples_left_to_process = | 112 bool samples_left_to_process = |
111 reverse_buffer_reader_->Read(reverse_in_buf_.get()); | 113 reverse_buffer_reader_->Read(reverse_in_buf_.get()); |
112 if (samples_left_to_process) { | 114 if (samples_left_to_process) { |
(...skipping 39 matching lines...) Loading... |
152 } | 154 } |
153 | 155 |
154 SetupBuffersConfigsOutputs( | 156 SetupBuffersConfigsOutputs( |
155 input_sample_rate_hz, output_sample_rate_hz, reverse_sample_rate_hz, | 157 input_sample_rate_hz, output_sample_rate_hz, reverse_sample_rate_hz, |
156 reverse_output_sample_rate_hz, input_num_channels, output_num_channels, | 158 reverse_output_sample_rate_hz, input_num_channels, output_num_channels, |
157 reverse_num_channels, reverse_output_num_channels); | 159 reverse_num_channels, reverse_output_num_channels); |
158 } | 160 } |
159 | 161 |
160 } // namespace test | 162 } // namespace test |
161 } // namespace webrtc | 163 } // namespace webrtc |
OLD | NEW |