| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/renderer/media/media_stream_audio_processor.h" | 5 #include "content/renderer/media/media_stream_audio_processor.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
| 9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 return; | 474 return; |
| 475 } | 475 } |
| 476 | 476 |
| 477 // Experimental options provided at creation. | 477 // Experimental options provided at creation. |
| 478 webrtc::Config config; | 478 webrtc::Config config; |
| 479 if (goog_experimental_aec) | 479 if (goog_experimental_aec) |
| 480 config.Set<webrtc::ExtendedFilter>(new webrtc::ExtendedFilter(true)); | 480 config.Set<webrtc::ExtendedFilter>(new webrtc::ExtendedFilter(true)); |
| 481 if (goog_experimental_ns) | 481 if (goog_experimental_ns) |
| 482 config.Set<webrtc::ExperimentalNs>(new webrtc::ExperimentalNs(true)); | 482 config.Set<webrtc::ExperimentalNs>(new webrtc::ExperimentalNs(true)); |
| 483 if (IsDelayAgnosticAecEnabled()) | 483 if (IsDelayAgnosticAecEnabled()) |
| 484 config.Set<webrtc::ReportedDelay>(new webrtc::ReportedDelay(false)); | 484 config.Set<webrtc::DelayAgnostic>(new webrtc::DelayAgnostic(true)); |
| 485 if (goog_beamforming) { | 485 if (goog_beamforming) { |
| 486 ConfigureBeamforming(&config, audio_constraints.GetPropertyAsString( | 486 ConfigureBeamforming(&config, audio_constraints.GetPropertyAsString( |
| 487 MediaAudioConstraints::kGoogArrayGeometry)); | 487 MediaAudioConstraints::kGoogArrayGeometry)); |
| 488 } | 488 } |
| 489 | 489 |
| 490 // Create and configure the webrtc::AudioProcessing. | 490 // Create and configure the webrtc::AudioProcessing. |
| 491 audio_processing_.reset(webrtc::AudioProcessing::Create(config)); | 491 audio_processing_.reset(webrtc::AudioProcessing::Create(config)); |
| 492 | 492 |
| 493 // Enable the audio processing components. | 493 // Enable the audio processing components. |
| 494 if (echo_cancellation) { | 494 if (echo_cancellation) { |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 722 if (echo_information_) { | 722 if (echo_information_) { |
| 723 echo_information_.get()->UpdateAecDelayStats(ap->echo_cancellation()); | 723 echo_information_.get()->UpdateAecDelayStats(ap->echo_cancellation()); |
| 724 } | 724 } |
| 725 | 725 |
| 726 // Return 0 if the volume hasn't been changed, and otherwise the new volume. | 726 // Return 0 if the volume hasn't been changed, and otherwise the new volume. |
| 727 return (agc->stream_analog_level() == volume) ? | 727 return (agc->stream_analog_level() == volume) ? |
| 728 0 : agc->stream_analog_level(); | 728 0 : agc->stream_analog_level(); |
| 729 } | 729 } |
| 730 | 730 |
| 731 } // namespace content | 731 } // namespace content |
| OLD | NEW |