OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 | 230 |
231 intelligibility_enhancer->ProcessRenderAudio( | 231 intelligibility_enhancer->ProcessRenderAudio( |
232 render_audio_buffer->split_channels_f(kBand0To8kHz), | 232 render_audio_buffer->split_channels_f(kBand0To8kHz), |
233 IntelligibilityEnhancerSampleRate(sample_rate_hz), | 233 IntelligibilityEnhancerSampleRate(sample_rate_hz), |
234 render_audio_buffer->num_channels()); | 234 render_audio_buffer->num_channels()); |
235 | 235 |
236 noise_suppressor->AnalyzeCaptureAudio(capture_audio_buffer); | 236 noise_suppressor->AnalyzeCaptureAudio(capture_audio_buffer); |
237 noise_suppressor->ProcessCaptureAudio(capture_audio_buffer); | 237 noise_suppressor->ProcessCaptureAudio(capture_audio_buffer); |
238 | 238 |
239 intelligibility_enhancer->SetCaptureNoiseEstimate( | 239 intelligibility_enhancer->SetCaptureNoiseEstimate( |
240 noise_suppressor->NoiseEstimate()); | 240 noise_suppressor->NoiseEstimate(), 0); |
241 | 241 |
242 if (sample_rate_hz > AudioProcessing::kSampleRate16kHz) { | 242 if (sample_rate_hz > AudioProcessing::kSampleRate16kHz) { |
243 render_audio_buffer->MergeFrequencyBands(); | 243 render_audio_buffer->MergeFrequencyBands(); |
244 } | 244 } |
245 } | 245 } |
246 | 246 |
247 // Processes a specified amount of frames, verifies the results and reports | 247 // Processes a specified amount of frames, verifies the results and reports |
248 // any errors. | 248 // any errors. |
249 void RunBitexactnessTest(int sample_rate_hz, | 249 void RunBitexactnessTest(int sample_rate_hz, |
250 size_t num_channels, | 250 size_t num_channels, |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 } | 449 } |
450 | 450 |
451 TEST(IntelligibilityEnhancerBitExactnessTest, DISABLED_Stereo48kHz) { | 451 TEST(IntelligibilityEnhancerBitExactnessTest, DISABLED_Stereo48kHz) { |
452 const float kOutputReference[] = {-0.009276f, -0.001601f, -0.008255f, | 452 const float kOutputReference[] = {-0.009276f, -0.001601f, -0.008255f, |
453 -0.012975f, -0.015940f, -0.017820f}; | 453 -0.012975f, -0.015940f, -0.017820f}; |
454 | 454 |
455 RunBitexactnessTest(AudioProcessing::kSampleRate48kHz, 2, kOutputReference); | 455 RunBitexactnessTest(AudioProcessing::kSampleRate48kHz, 2, kOutputReference); |
456 } | 456 } |
457 | 457 |
458 } // namespace webrtc | 458 } // namespace webrtc |
OLD | NEW |