diff options
Diffstat (limited to 'chromium/content/renderer/media/stream/media_stream_audio_processor_options.cc')
-rw-r--r-- | chromium/content/renderer/media/stream/media_stream_audio_processor_options.cc | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/chromium/content/renderer/media/stream/media_stream_audio_processor_options.cc b/chromium/content/renderer/media/stream/media_stream_audio_processor_options.cc index 4c471a4ea36..7a5a6274a5c 100644 --- a/chromium/content/renderer/media/stream/media_stream_audio_processor_options.cc +++ b/chromium/content/renderer/media/stream/media_stream_audio_processor_options.cc @@ -67,25 +67,29 @@ AudioProcessingProperties::AudioProcessingProperties( const AudioProcessingProperties& other) = default; AudioProcessingProperties& AudioProcessingProperties::operator=( const AudioProcessingProperties& other) = default; -AudioProcessingProperties::AudioProcessingProperties( - AudioProcessingProperties&& other) = default; -AudioProcessingProperties& AudioProcessingProperties::operator=( - AudioProcessingProperties&& other) = default; -AudioProcessingProperties::~AudioProcessingProperties() = default; void AudioProcessingProperties::DisableDefaultProperties() { - enable_sw_echo_cancellation = false; - disable_hw_echo_cancellation = false; + echo_cancellation_type = EchoCancellationType::kEchoCancellationDisabled; goog_auto_gain_control = false; goog_experimental_echo_cancellation = false; goog_typing_noise_detection = false; goog_noise_suppression = false; goog_experimental_noise_suppression = false; - goog_beamforming = false; goog_highpass_filter = false; goog_experimental_auto_gain_control = false; } +bool AudioProcessingProperties::EchoCancellationEnabled() const { + return echo_cancellation_type != + EchoCancellationType::kEchoCancellationDisabled; +} + +bool AudioProcessingProperties::EchoCancellationIsWebRtcProvided() const { + return echo_cancellation_type == + EchoCancellationType::kEchoCancellationAec2 || + echo_cancellation_type == EchoCancellationType::kEchoCancellationAec3; +} + EchoInformation::EchoInformation() : delay_stats_time_ms_(0), echo_frames_received_(false), @@ -271,8 +275,7 @@ void EnableAutomaticGainControl(AudioProcessing* audio_processing) { void GetAudioProcessingStats( AudioProcessing* audio_processing, webrtc::AudioProcessorInterface::AudioProcessorStats* stats) { - // TODO(ivoc): Change the APM stats to use rtc::Optional instead of default - // values. + // TODO(ivoc): Change the APM stats to use optional instead of default values. auto apm_stats = audio_processing->GetStatistics(); stats->echo_return_loss = apm_stats.echo_return_loss.instant(); stats->echo_return_loss_enhancement = |