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 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1177 capture_nonlocked_.fwd_proc_format.sample_rate_hz() == | 1177 capture_nonlocked_.fwd_proc_format.sample_rate_hz() == |
1178 kSampleRate48kHz) { | 1178 kSampleRate48kHz) { |
1179 // Something besides public_submodules_->level_estimator is enabled, and we | 1179 // Something besides public_submodules_->level_estimator is enabled, and we |
1180 // have super-wb. | 1180 // have super-wb. |
1181 return true; | 1181 return true; |
1182 } | 1182 } |
1183 return false; | 1183 return false; |
1184 } | 1184 } |
1185 | 1185 |
1186 bool AudioProcessingImpl::is_rev_processed() const { | 1186 bool AudioProcessingImpl::is_rev_processed() const { |
1187 return constants_.intelligibility_enabled && | 1187 return constants_.intelligibility_enabled; |
1188 public_submodules_->intelligibility_enhancer->active(); | |
1189 } | 1188 } |
1190 | 1189 |
1191 bool AudioProcessingImpl::render_check_rev_conversion_needed() const { | 1190 bool AudioProcessingImpl::render_check_rev_conversion_needed() const { |
1192 return rev_conversion_needed(); | 1191 return rev_conversion_needed(); |
1193 } | 1192 } |
1194 | 1193 |
1195 bool AudioProcessingImpl::rev_conversion_needed() const { | 1194 bool AudioProcessingImpl::rev_conversion_needed() const { |
1196 return (formats_.api_format.reverse_input_stream() != | 1195 return (formats_.api_format.reverse_input_stream() != |
1197 formats_.api_format.reverse_output_stream()); | 1196 formats_.api_format.reverse_output_stream()); |
1198 } | 1197 } |
(...skipping 30 matching lines...) Expand all Loading... |
1229 private_submodules_->beamformer.reset(new NonlinearBeamformer( | 1228 private_submodules_->beamformer.reset(new NonlinearBeamformer( |
1230 capture_.array_geometry, capture_.target_direction)); | 1229 capture_.array_geometry, capture_.target_direction)); |
1231 } | 1230 } |
1232 private_submodules_->beamformer->Initialize(kChunkSizeMs, | 1231 private_submodules_->beamformer->Initialize(kChunkSizeMs, |
1233 capture_nonlocked_.split_rate); | 1232 capture_nonlocked_.split_rate); |
1234 } | 1233 } |
1235 } | 1234 } |
1236 | 1235 |
1237 void AudioProcessingImpl::InitializeIntelligibility() { | 1236 void AudioProcessingImpl::InitializeIntelligibility() { |
1238 if (constants_.intelligibility_enabled) { | 1237 if (constants_.intelligibility_enabled) { |
1239 IntelligibilityEnhancer::Config config; | |
1240 config.sample_rate_hz = capture_nonlocked_.split_rate; | |
1241 config.num_capture_channels = capture_.capture_audio->num_channels(); | |
1242 config.num_render_channels = render_.render_audio->num_channels(); | |
1243 public_submodules_->intelligibility_enhancer.reset( | 1238 public_submodules_->intelligibility_enhancer.reset( |
1244 new IntelligibilityEnhancer(config)); | 1239 new IntelligibilityEnhancer(capture_nonlocked_.split_rate, |
| 1240 render_.render_audio->num_channels())); |
1245 } | 1241 } |
1246 } | 1242 } |
1247 | 1243 |
1248 void AudioProcessingImpl::InitializeHighPassFilter() { | 1244 void AudioProcessingImpl::InitializeHighPassFilter() { |
1249 public_submodules_->high_pass_filter->Initialize(num_proc_channels(), | 1245 public_submodules_->high_pass_filter->Initialize(num_proc_channels(), |
1250 proc_sample_rate_hz()); | 1246 proc_sample_rate_hz()); |
1251 } | 1247 } |
1252 | 1248 |
1253 void AudioProcessingImpl::InitializeNoiseSuppression() { | 1249 void AudioProcessingImpl::InitializeNoiseSuppression() { |
1254 public_submodules_->noise_suppression->Initialize(num_proc_channels(), | 1250 public_submodules_->noise_suppression->Initialize(num_proc_channels(), |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1456 debug_dump_.capture.event_msg->mutable_config()->CopyFrom(config); | 1452 debug_dump_.capture.event_msg->mutable_config()->CopyFrom(config); |
1457 | 1453 |
1458 RETURN_ON_ERR(WriteMessageToDebugFile(debug_dump_.debug_file.get(), | 1454 RETURN_ON_ERR(WriteMessageToDebugFile(debug_dump_.debug_file.get(), |
1459 &debug_dump_.num_bytes_left_for_log_, | 1455 &debug_dump_.num_bytes_left_for_log_, |
1460 &crit_debug_, &debug_dump_.capture)); | 1456 &crit_debug_, &debug_dump_.capture)); |
1461 return kNoError; | 1457 return kNoError; |
1462 } | 1458 } |
1463 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP | 1459 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP |
1464 | 1460 |
1465 } // namespace webrtc | 1461 } // namespace webrtc |
OLD | NEW |