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 #include <vector> | 10 #include <vector> |
(...skipping 28 matching lines...) Expand all Loading... |
39 int stream_delay_ms, | 39 int stream_delay_ms, |
40 AudioBuffer* render_audio_buffer, | 40 AudioBuffer* render_audio_buffer, |
41 AudioBuffer* capture_audio_buffer, | 41 AudioBuffer* capture_audio_buffer, |
42 EchoControlMobileImpl* echo_control_mobile) { | 42 EchoControlMobileImpl* echo_control_mobile) { |
43 if (sample_rate_hz > AudioProcessing::kSampleRate16kHz) { | 43 if (sample_rate_hz > AudioProcessing::kSampleRate16kHz) { |
44 render_audio_buffer->SplitIntoFrequencyBands(); | 44 render_audio_buffer->SplitIntoFrequencyBands(); |
45 capture_audio_buffer->SplitIntoFrequencyBands(); | 45 capture_audio_buffer->SplitIntoFrequencyBands(); |
46 } | 46 } |
47 | 47 |
48 echo_control_mobile->ProcessRenderAudio(render_audio_buffer); | 48 echo_control_mobile->ProcessRenderAudio(render_audio_buffer); |
| 49 echo_control_mobile->ReadQueuedRenderData(); |
49 echo_control_mobile->ProcessCaptureAudio(capture_audio_buffer, | 50 echo_control_mobile->ProcessCaptureAudio(capture_audio_buffer, |
50 stream_delay_ms); | 51 stream_delay_ms); |
51 | 52 |
52 if (sample_rate_hz > AudioProcessing::kSampleRate16kHz) { | 53 if (sample_rate_hz > AudioProcessing::kSampleRate16kHz) { |
53 capture_audio_buffer->MergeFrequencyBands(); | 54 capture_audio_buffer->MergeFrequencyBands(); |
54 } | 55 } |
55 } | 56 } |
56 | 57 |
57 void RunBitexactnessTest(int sample_rate_hz, | 58 void RunBitexactnessTest(int sample_rate_hz, |
58 size_t num_channels, | 59 size_t num_channels, |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 DISABLED_Mono16kHz_LoudSpeakerPhone_CngOn_StreamDelay5) { | 168 DISABLED_Mono16kHz_LoudSpeakerPhone_CngOn_StreamDelay5) { |
168 const float kOutputReference[] = {0.003693f, 0.002930f, 0.001801f}; | 169 const float kOutputReference[] = {0.003693f, 0.002930f, 0.001801f}; |
169 | 170 |
170 RunBitexactnessTest(16000, 1, 5, | 171 RunBitexactnessTest(16000, 1, 5, |
171 EchoControlMobile::RoutingMode::kLoudSpeakerphone, true, | 172 EchoControlMobile::RoutingMode::kLoudSpeakerphone, true, |
172 kOutputReference); | 173 kOutputReference); |
173 } | 174 } |
174 | 175 |
175 TEST(EchoControlMobileBitExactnessTest, | 176 TEST(EchoControlMobileBitExactnessTest, |
176 Mono16kHz_LoudSpeakerPhone_CngOn_StreamDelay10) { | 177 Mono16kHz_LoudSpeakerPhone_CngOn_StreamDelay10) { |
177 const float kOutputReference[] = {-0.002411f, -0.002716f, -0.002747f}; | 178 const float kOutputReference[] = {-0.002380f, -0.002533f, -0.002563f}; |
178 | 179 |
179 RunBitexactnessTest(16000, 1, 10, | 180 RunBitexactnessTest(16000, 1, 10, |
180 EchoControlMobile::RoutingMode::kLoudSpeakerphone, true, | 181 EchoControlMobile::RoutingMode::kLoudSpeakerphone, true, |
181 kOutputReference); | 182 kOutputReference); |
182 } | 183 } |
183 | 184 |
184 TEST(EchoControlMobileBitExactnessTest, | 185 TEST(EchoControlMobileBitExactnessTest, |
185 DISABLED_Mono16kHz_QuietEarpieceOrHeadset_CngOn_StreamDelay0) { | 186 DISABLED_Mono16kHz_QuietEarpieceOrHeadset_CngOn_StreamDelay0) { |
186 const float kOutputReference[] = {0.000397f, 0.000000f, -0.000305f}; | 187 const float kOutputReference[] = {0.000397f, 0.000000f, -0.000305f}; |
187 | 188 |
(...skipping 22 matching lines...) Expand all Loading... |
210 TEST(EchoControlMobileBitExactnessTest, | 211 TEST(EchoControlMobileBitExactnessTest, |
211 DISABLED_Mono16kHz_SpeakerPhone_CngOn_StreamDelay0) { | 212 DISABLED_Mono16kHz_SpeakerPhone_CngOn_StreamDelay0) { |
212 const float kOutputReference[] = {0.003632f, 0.003052f, 0.001984f}; | 213 const float kOutputReference[] = {0.003632f, 0.003052f, 0.001984f}; |
213 | 214 |
214 RunBitexactnessTest(16000, 1, 0, | 215 RunBitexactnessTest(16000, 1, 0, |
215 EchoControlMobile::RoutingMode::kSpeakerphone, true, | 216 EchoControlMobile::RoutingMode::kSpeakerphone, true, |
216 kOutputReference); | 217 kOutputReference); |
217 } | 218 } |
218 | 219 |
219 } // namespace webrtc | 220 } // namespace webrtc |
OLD | NEW |