Chromium Code Reviews| Index: webrtc/media/engine/webrtcvoiceengine.cc |
| diff --git a/webrtc/media/engine/webrtcvoiceengine.cc b/webrtc/media/engine/webrtcvoiceengine.cc |
| index ed67ce84ba00cc520872b1a17e0ea8bdbb579160..8ab59a0935e7b7837bd51470b7b955087c46627b 100644 |
| --- a/webrtc/media/engine/webrtcvoiceengine.cc |
| +++ b/webrtc/media/engine/webrtcvoiceengine.cc |
| @@ -577,6 +577,7 @@ WebRtcVoiceEngine::WebRtcVoiceEngine(webrtc::AudioDeviceModule* adm, |
| options.extended_filter_aec = rtc::Optional<bool>(false); |
| options.delay_agnostic_aec = rtc::Optional<bool>(false); |
| options.experimental_ns = rtc::Optional<bool>(false); |
| + options.intelligibility_enhancer = rtc::Optional<bool>(false); |
| bool error = ApplyOptions(options); |
| RTC_DCHECK(error); |
| } |
| @@ -746,11 +747,20 @@ bool WebRtcVoiceEngine::ApplyOptions(const AudioOptions& options_in) { |
| } |
| } |
| + if (options.intelligibility_enhancer) { |
|
henrika_webrtc
2016/05/12 06:58:32
Please add logs here as well and verify that you n
aluebs-webrtc
2016/05/13 02:04:38
Good point! The log of "IE enabled" is below where
|
| + intelligibility_enhancer_ = options.intelligibility_enhancer; |
| + if (intelligibility_enhancer_ && *intelligibility_enhancer_) { |
|
the sun
2016/05/12 11:50:01
why do you need the first half of this condition?
aluebs-webrtc
2016/05/13 02:04:38
That is exactly what I meant it to be, thank you :
|
| + options.noise_suppression = intelligibility_enhancer_; |
| + } |
| + } |
| + |
| if (options.noise_suppression) { |
| const bool built_in_ns = adm()->BuiltInNSIsAvailable(); |
| if (built_in_ns) { |
| - if (adm()->EnableBuiltInNS(*options.noise_suppression) == 0 && |
| - *options.noise_suppression) { |
| + bool builtin_ns = |
|
the sun
2016/05/12 11:50:01
You have one variable named "built_in_ns" and one
aluebs-webrtc
2016/05/13 02:04:38
Great suggestion! Done.
|
| + *options.noise_suppression && |
| + !(intelligibility_enhancer_ && * intelligibility_enhancer_); |
|
the sun
2016/05/12 11:50:01
nit: no space after *
aluebs-webrtc
2016/05/13 02:04:38
Done.
|
| + if (adm()->EnableBuiltInNS(builtin_ns) == 0 && builtin_ns) { |
| // Disable internal software NS if built-in NS is enabled, |
| // i.e., replace the software NS with the built-in NS. |
| options.noise_suppression = rtc::Optional<bool>(false); |
| @@ -843,6 +853,13 @@ bool WebRtcVoiceEngine::ApplyOptions(const AudioOptions& options_in) { |
| new webrtc::ExperimentalNs(*experimental_ns_)); |
| } |
| + if (intelligibility_enhancer_) { |
| + LOG(LS_INFO) << "Intelligibility Enhancer is enabled? " |
| + << *intelligibility_enhancer_; |
| + config.Set<webrtc::Intelligibility>( |
| + new webrtc::Intelligibility(*intelligibility_enhancer_)); |
| + } |
| + |
| // We check audioproc for the benefit of tests, since FakeWebRtcVoiceEngine |
| // returns NULL on audio_processing(). |
| webrtc::AudioProcessing* audioproc = voe_wrapper_->base()->audio_processing(); |