| Index: content/renderer/media/media_stream_audio_processor_options.cc
|
| diff --git a/content/renderer/media/media_stream_audio_processor_options.cc b/content/renderer/media/media_stream_audio_processor_options.cc
|
| index 1f875f9525e0d89317c614bd20c6ec6dd659cbae..79614dff3f133e70371b7250148a2cf2daaae17a 100644
|
| --- a/content/renderer/media/media_stream_audio_processor_options.cc
|
| +++ b/content/renderer/media/media_stream_audio_processor_options.cc
|
| @@ -51,27 +51,29 @@ struct {
|
| const char* key;
|
| bool value;
|
| } const kDefaultAudioConstraints[] = {
|
| - { MediaAudioConstraints::kEchoCancellation, true },
|
| - { MediaAudioConstraints::kGoogEchoCancellation, true },
|
| + {MediaAudioConstraints::kEchoCancellation, true},
|
| + {MediaAudioConstraints::kGoogEchoCancellation, true},
|
| #if defined(OS_ANDROID) || defined(OS_IOS)
|
| - { MediaAudioConstraints::kGoogExperimentalEchoCancellation, false },
|
| + {MediaAudioConstraints::kGoogExperimentalEchoCancellation, false},
|
| #else
|
| - // Enable the extended filter mode AEC on all non-mobile platforms.
|
| - { MediaAudioConstraints::kGoogExperimentalEchoCancellation, true },
|
| + // Enable the extended filter mode AEC on all non-mobile platforms.
|
| + {MediaAudioConstraints::kGoogExperimentalEchoCancellation, true},
|
| #endif
|
| - { MediaAudioConstraints::kGoogAutoGainControl, true },
|
| - { MediaAudioConstraints::kGoogExperimentalAutoGainControl, true },
|
| - { MediaAudioConstraints::kGoogNoiseSuppression, true },
|
| - { MediaAudioConstraints::kGoogHighpassFilter, true },
|
| - { MediaAudioConstraints::kGoogTypingNoiseDetection, true },
|
| - { MediaAudioConstraints::kGoogExperimentalNoiseSuppression, false },
|
| - { MediaAudioConstraints::kGoogBeamforming, false },
|
| + {MediaAudioConstraints::kGoogAutoGainControl, true},
|
| + {MediaAudioConstraints::kGoogExperimentalAutoGainControl, true},
|
| + {MediaAudioConstraints::kGoogNoiseSuppression, true},
|
| + {MediaAudioConstraints::kGoogHighpassFilter, true},
|
| + {MediaAudioConstraints::kGoogTypingNoiseDetection, true},
|
| + {MediaAudioConstraints::kGoogExperimentalNoiseSuppression, false},
|
| + // Beamforming will only be enabled if we are also provided with a
|
| + // multi-microphone geometry.
|
| + {MediaAudioConstraints::kGoogBeamforming, false},
|
| #if defined(OS_WIN)
|
| - { kMediaStreamAudioDucking, true },
|
| + {kMediaStreamAudioDucking, true},
|
| #else
|
| - { kMediaStreamAudioDucking, false },
|
| + {kMediaStreamAudioDucking, false},
|
| #endif
|
| - { kMediaStreamAudioHotword, false },
|
| + {kMediaStreamAudioHotword, false},
|
| };
|
|
|
| bool IsAudioProcessingConstraint(const std::string& key) {
|
| @@ -393,10 +395,14 @@ void GetAecStats(webrtc::EchoCancellation* echo_cancellation,
|
|
|
| CONTENT_EXPORT std::vector<webrtc::Point> ParseArrayGeometry(
|
| const std::string& geometry_string) {
|
| + std::vector<webrtc::Point> geometry;
|
| + if (geometry_string.empty()) {
|
| + return geometry;
|
| + }
|
| +
|
| const auto& tokens =
|
| base::SplitString(geometry_string, base::kWhitespaceASCII,
|
| base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
|
| - std::vector<webrtc::Point> geometry;
|
| if (tokens.size() < 3 || tokens.size() % 3 != 0) {
|
| LOG(ERROR) << "Malformed geometry string: " << geometry_string;
|
| return geometry;
|
|
|