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 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1200 capture_nonlocked_.fwd_proc_format.sample_rate_hz() == | 1200 capture_nonlocked_.fwd_proc_format.sample_rate_hz() == |
1201 kSampleRate48kHz) { | 1201 kSampleRate48kHz) { |
1202 // Something besides public_submodules_->level_estimator is enabled, and we | 1202 // Something besides public_submodules_->level_estimator is enabled, and we |
1203 // have super-wb. | 1203 // have super-wb. |
1204 return true; | 1204 return true; |
1205 } | 1205 } |
1206 return false; | 1206 return false; |
1207 } | 1207 } |
1208 | 1208 |
1209 bool AudioProcessingImpl::is_rev_processed() const { | 1209 bool AudioProcessingImpl::is_rev_processed() const { |
1210 return constants_.intelligibility_enabled && | 1210 return constants_.intelligibility_enabled; |
1211 public_submodules_->intelligibility_enhancer->active(); | |
1212 } | 1211 } |
1213 | 1212 |
1214 bool AudioProcessingImpl::render_check_rev_conversion_needed() const { | 1213 bool AudioProcessingImpl::render_check_rev_conversion_needed() const { |
1215 return rev_conversion_needed(); | 1214 return rev_conversion_needed(); |
1216 } | 1215 } |
1217 | 1216 |
1218 bool AudioProcessingImpl::rev_conversion_needed() const { | 1217 bool AudioProcessingImpl::rev_conversion_needed() const { |
1219 return (formats_.api_format.reverse_input_stream() != | 1218 return (formats_.api_format.reverse_input_stream() != |
1220 formats_.api_format.reverse_output_stream()); | 1219 formats_.api_format.reverse_output_stream()); |
1221 } | 1220 } |
(...skipping 30 matching lines...) Expand all Loading... |
1252 private_submodules_->beamformer.reset(new NonlinearBeamformer( | 1251 private_submodules_->beamformer.reset(new NonlinearBeamformer( |
1253 capture_.array_geometry, capture_.target_direction)); | 1252 capture_.array_geometry, capture_.target_direction)); |
1254 } | 1253 } |
1255 private_submodules_->beamformer->Initialize(kChunkSizeMs, | 1254 private_submodules_->beamformer->Initialize(kChunkSizeMs, |
1256 capture_nonlocked_.split_rate); | 1255 capture_nonlocked_.split_rate); |
1257 } | 1256 } |
1258 } | 1257 } |
1259 | 1258 |
1260 void AudioProcessingImpl::InitializeIntelligibility() { | 1259 void AudioProcessingImpl::InitializeIntelligibility() { |
1261 if (constants_.intelligibility_enabled) { | 1260 if (constants_.intelligibility_enabled) { |
1262 IntelligibilityEnhancer::Config config; | |
1263 config.sample_rate_hz = capture_nonlocked_.split_rate; | |
1264 config.num_capture_channels = capture_.capture_audio->num_channels(); | |
1265 config.num_render_channels = render_.render_audio->num_channels(); | |
1266 public_submodules_->intelligibility_enhancer.reset( | 1261 public_submodules_->intelligibility_enhancer.reset( |
1267 new IntelligibilityEnhancer(config)); | 1262 new IntelligibilityEnhancer(capture_nonlocked_.split_rate, |
| 1263 render_.render_audio->num_channels())); |
1268 } | 1264 } |
1269 } | 1265 } |
1270 | 1266 |
1271 void AudioProcessingImpl::InitializeHighPassFilter() { | 1267 void AudioProcessingImpl::InitializeHighPassFilter() { |
1272 public_submodules_->high_pass_filter->Initialize(num_proc_channels(), | 1268 public_submodules_->high_pass_filter->Initialize(num_proc_channels(), |
1273 proc_sample_rate_hz()); | 1269 proc_sample_rate_hz()); |
1274 } | 1270 } |
1275 | 1271 |
1276 void AudioProcessingImpl::InitializeNoiseSuppression() { | 1272 void AudioProcessingImpl::InitializeNoiseSuppression() { |
1277 public_submodules_->noise_suppression->Initialize(num_proc_channels(), | 1273 public_submodules_->noise_suppression->Initialize(num_proc_channels(), |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1479 debug_dump_.capture.event_msg->mutable_config()->CopyFrom(config); | 1475 debug_dump_.capture.event_msg->mutable_config()->CopyFrom(config); |
1480 | 1476 |
1481 RETURN_ON_ERR(WriteMessageToDebugFile(debug_dump_.debug_file.get(), | 1477 RETURN_ON_ERR(WriteMessageToDebugFile(debug_dump_.debug_file.get(), |
1482 &debug_dump_.num_bytes_left_for_log_, | 1478 &debug_dump_.num_bytes_left_for_log_, |
1483 &crit_debug_, &debug_dump_.capture)); | 1479 &crit_debug_, &debug_dump_.capture)); |
1484 return kNoError; | 1480 return kNoError; |
1485 } | 1481 } |
1486 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP | 1482 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP |
1487 | 1483 |
1488 } // namespace webrtc | 1484 } // namespace webrtc |
OLD | NEW |