| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1263 capture_nonlocked_.fwd_proc_format.sample_rate_hz() == | 1263 capture_nonlocked_.fwd_proc_format.sample_rate_hz() == |
| 1264 kSampleRate48kHz) { | 1264 kSampleRate48kHz) { |
| 1265 // Something besides public_submodules_->level_estimator is enabled, and we | 1265 // Something besides public_submodules_->level_estimator is enabled, and we |
| 1266 // have super-wb. | 1266 // have super-wb. |
| 1267 return true; | 1267 return true; |
| 1268 } | 1268 } |
| 1269 return false; | 1269 return false; |
| 1270 } | 1270 } |
| 1271 | 1271 |
| 1272 bool AudioProcessingImpl::is_rev_processed() const { | 1272 bool AudioProcessingImpl::is_rev_processed() const { |
| 1273 return constants_.intelligibility_enabled && | 1273 return constants_.intelligibility_enabled; |
| 1274 public_submodules_->intelligibility_enhancer->active(); | |
| 1275 } | 1274 } |
| 1276 | 1275 |
| 1277 bool AudioProcessingImpl::render_check_rev_conversion_needed() const { | 1276 bool AudioProcessingImpl::render_check_rev_conversion_needed() const { |
| 1278 return rev_conversion_needed(); | 1277 return rev_conversion_needed(); |
| 1279 } | 1278 } |
| 1280 | 1279 |
| 1281 bool AudioProcessingImpl::rev_conversion_needed() const { | 1280 bool AudioProcessingImpl::rev_conversion_needed() const { |
| 1282 return (formats_.api_format.reverse_input_stream() != | 1281 return (formats_.api_format.reverse_input_stream() != |
| 1283 formats_.api_format.reverse_output_stream()); | 1282 formats_.api_format.reverse_output_stream()); |
| 1284 } | 1283 } |
| (...skipping 30 matching lines...) Expand all Loading... |
| 1315 private_submodules_->beamformer.reset(new NonlinearBeamformer( | 1314 private_submodules_->beamformer.reset(new NonlinearBeamformer( |
| 1316 capture_.array_geometry, capture_.target_direction)); | 1315 capture_.array_geometry, capture_.target_direction)); |
| 1317 } | 1316 } |
| 1318 private_submodules_->beamformer->Initialize(kChunkSizeMs, | 1317 private_submodules_->beamformer->Initialize(kChunkSizeMs, |
| 1319 capture_nonlocked_.split_rate); | 1318 capture_nonlocked_.split_rate); |
| 1320 } | 1319 } |
| 1321 } | 1320 } |
| 1322 | 1321 |
| 1323 void AudioProcessingImpl::InitializeIntelligibility() { | 1322 void AudioProcessingImpl::InitializeIntelligibility() { |
| 1324 if (constants_.intelligibility_enabled) { | 1323 if (constants_.intelligibility_enabled) { |
| 1325 IntelligibilityEnhancer::Config config; | |
| 1326 config.sample_rate_hz = capture_nonlocked_.split_rate; | |
| 1327 config.num_capture_channels = capture_.capture_audio->num_channels(); | |
| 1328 config.num_render_channels = render_.render_audio->num_channels(); | |
| 1329 public_submodules_->intelligibility_enhancer.reset( | 1324 public_submodules_->intelligibility_enhancer.reset( |
| 1330 new IntelligibilityEnhancer(config)); | 1325 new IntelligibilityEnhancer(capture_nonlocked_.split_rate, |
| 1326 render_.render_audio->num_channels())); |
| 1331 } | 1327 } |
| 1332 } | 1328 } |
| 1333 | 1329 |
| 1334 void AudioProcessingImpl::InitializeHighPassFilter() { | 1330 void AudioProcessingImpl::InitializeHighPassFilter() { |
| 1335 public_submodules_->high_pass_filter->Initialize(num_proc_channels(), | 1331 public_submodules_->high_pass_filter->Initialize(num_proc_channels(), |
| 1336 proc_sample_rate_hz()); | 1332 proc_sample_rate_hz()); |
| 1337 } | 1333 } |
| 1338 | 1334 |
| 1339 void AudioProcessingImpl::InitializeNoiseSuppression() { | 1335 void AudioProcessingImpl::InitializeNoiseSuppression() { |
| 1340 public_submodules_->noise_suppression->Initialize(num_proc_channels(), | 1336 public_submodules_->noise_suppression->Initialize(num_proc_channels(), |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1542 debug_dump_.capture.event_msg->mutable_config()->CopyFrom(config); | 1538 debug_dump_.capture.event_msg->mutable_config()->CopyFrom(config); |
| 1543 | 1539 |
| 1544 RETURN_ON_ERR(WriteMessageToDebugFile(debug_dump_.debug_file.get(), | 1540 RETURN_ON_ERR(WriteMessageToDebugFile(debug_dump_.debug_file.get(), |
| 1545 &debug_dump_.num_bytes_left_for_log_, | 1541 &debug_dump_.num_bytes_left_for_log_, |
| 1546 &crit_debug_, &debug_dump_.capture)); | 1542 &crit_debug_, &debug_dump_.capture)); |
| 1547 return kNoError; | 1543 return kNoError; |
| 1548 } | 1544 } |
| 1549 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP | 1545 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP |
| 1550 | 1546 |
| 1551 } // namespace webrtc | 1547 } // namespace webrtc |
| OLD | NEW |