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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
457 void AudioProcessingImpl::SetExtraOptions(const Config& config) { | 457 void AudioProcessingImpl::SetExtraOptions(const Config& config) { |
458 CriticalSectionScoped crit_scoped(crit_); | 458 CriticalSectionScoped crit_scoped(crit_); |
459 for (auto item : component_list_) { | 459 for (auto item : component_list_) { |
460 item->SetExtraOptions(config); | 460 item->SetExtraOptions(config); |
461 } | 461 } |
462 | 462 |
463 if (transient_suppressor_enabled_ != config.Get<ExperimentalNs>().enabled) { | 463 if (transient_suppressor_enabled_ != config.Get<ExperimentalNs>().enabled) { |
464 transient_suppressor_enabled_ = config.Get<ExperimentalNs>().enabled; | 464 transient_suppressor_enabled_ = config.Get<ExperimentalNs>().enabled; |
465 InitializeTransient(); | 465 InitializeTransient(); |
466 } | 466 } |
467 | |
468 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP | |
469 if (debug_file_->Open()) { | |
470 int err = WriteInitMessage(); | |
ivoc
2015/09/22 11:18:54
Can you explain why this call needs to be added he
minyue-webrtc
2015/09/22 11:39:28
Yes, it may lead to multiple init messages, but wo
peah-webrtc
2015/09/22 12:05:29
I'm very new to the protobuf concept, what is the
minyue-webrtc
2015/09/22 13:19:29
I do not know better, and so I included Ivo in the
peah-webrtc
2015/09/24 09:28:01
Acknowledged.
peah-webrtc
2015/09/24 09:28:01
It definitely makes sense to have unpack.cc restar
| |
471 if (err != kNoError) { | |
472 LOG(LS_ERROR) << "Failed to update debug dump during SetExtraOptions."; | |
473 } | |
474 } | |
475 #endif | |
467 } | 476 } |
468 | 477 |
469 int AudioProcessingImpl::input_sample_rate_hz() const { | 478 int AudioProcessingImpl::input_sample_rate_hz() const { |
470 CriticalSectionScoped crit_scoped(crit_); | 479 CriticalSectionScoped crit_scoped(crit_); |
471 return api_format_.input_stream().sample_rate_hz(); | 480 return api_format_.input_stream().sample_rate_hz(); |
472 } | 481 } |
473 | 482 |
474 int AudioProcessingImpl::sample_rate_hz() const { | 483 int AudioProcessingImpl::sample_rate_hz() const { |
475 CriticalSectionScoped crit_scoped(crit_); | 484 CriticalSectionScoped crit_scoped(crit_); |
476 return api_format_.input_stream().sample_rate_hz(); | 485 return api_format_.input_stream().sample_rate_hz(); |
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1232 msg->set_sample_rate(api_format_.input_stream().sample_rate_hz()); | 1241 msg->set_sample_rate(api_format_.input_stream().sample_rate_hz()); |
1233 msg->set_num_input_channels(api_format_.input_stream().num_channels()); | 1242 msg->set_num_input_channels(api_format_.input_stream().num_channels()); |
1234 msg->set_num_output_channels(api_format_.output_stream().num_channels()); | 1243 msg->set_num_output_channels(api_format_.output_stream().num_channels()); |
1235 msg->set_num_reverse_channels( | 1244 msg->set_num_reverse_channels( |
1236 api_format_.reverse_input_stream().num_channels()); | 1245 api_format_.reverse_input_stream().num_channels()); |
1237 msg->set_reverse_sample_rate( | 1246 msg->set_reverse_sample_rate( |
1238 api_format_.reverse_input_stream().sample_rate_hz()); | 1247 api_format_.reverse_input_stream().sample_rate_hz()); |
1239 msg->set_output_sample_rate(api_format_.output_stream().sample_rate_hz()); | 1248 msg->set_output_sample_rate(api_format_.output_stream().sample_rate_hz()); |
1240 // TODO(ekmeyerson): Add reverse output fields to event_msg_. | 1249 // TODO(ekmeyerson): Add reverse output fields to event_msg_. |
1241 | 1250 |
1251 // Acoustic echo canceler | |
1252 msg->set_aec_enabled(echo_cancellation_->is_enabled()); | |
1253 msg->set_aec_delay_agnostic(echo_cancellation_->is_delay_logging_enabled()); | |
peah-webrtc
2015/09/22 12:05:29
The delay logging is set if the delay agnostic aec
minyue-webrtc
2015/09/22 13:19:29
Sorry, it is my bad, I chose a wrong flag to repor
| |
1254 | |
1255 msg->set_aec_drift_compensation( | |
1256 echo_cancellation_->is_drift_compensation_enabled()); | |
1257 msg->set_aec_extended_filter( | |
1258 echo_cancellation_->is_extended_filter_enabled()); | |
1259 msg->set_aec_suppression_level(echo_cancellation_->suppression_level()); | |
1260 | |
1261 // Mobile AEC | |
1262 msg->set_aecm_enabled(echo_control_mobile_->is_enabled()); | |
1263 msg->set_aecm_comfort_noise( | |
1264 echo_control_mobile_->is_comfort_noise_enabled()); | |
1265 msg->set_aecm_routing_mode(echo_control_mobile_->routing_mode()); | |
1266 | |
1267 // Automatic gain controller | |
1268 msg->set_agc_enabled(gain_control_->is_enabled()); | |
1269 msg->set_agc_mode(gain_control_->mode()); | |
1270 msg->set_agc_limiter(gain_control_->is_limiter_enabled()); | |
1271 | |
1272 // High pass filter | |
1273 msg->set_hpf_enabled(high_pass_filter_->is_enabled()); | |
1274 | |
1275 // Noise suppression | |
1276 msg->set_ns_enabled(noise_suppression_->is_enabled()); | |
1277 msg->set_ns_experiment(noise_suppression_->is_enabled()); | |
minyue-webrtc
2015/09/24 17:09:58
This was not right. noise suppression experiment i
| |
1278 msg->set_ns_level(noise_suppression_->level()); | |
1279 | |
1242 int err = WriteMessageToDebugFile(); | 1280 int err = WriteMessageToDebugFile(); |
1243 if (err != kNoError) { | 1281 if (err != kNoError) { |
1244 return err; | 1282 return err; |
1245 } | 1283 } |
1246 | 1284 |
1247 return kNoError; | 1285 return kNoError; |
1248 } | 1286 } |
1249 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP | 1287 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP |
1250 | 1288 |
1251 } // namespace webrtc | 1289 } // namespace webrtc |
OLD | NEW |