| 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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 if (!echo_cancellation && !goog_experimental_aec && !goog_ns && | 481 if (!echo_cancellation && !goog_experimental_aec && !goog_ns && |
| 482 !goog_high_pass_filter && !goog_typing_detection && | 482 !goog_high_pass_filter && !goog_typing_detection && |
| 483 !goog_agc && !goog_experimental_ns && !goog_beamforming) { | 483 !goog_agc && !goog_experimental_ns && !goog_beamforming) { |
| 484 RecordProcessingState(AUDIO_PROCESSING_DISABLED); | 484 RecordProcessingState(AUDIO_PROCESSING_DISABLED); |
| 485 return; | 485 return; |
| 486 } | 486 } |
| 487 | 487 |
| 488 // Experimental options provided at creation. | 488 // Experimental options provided at creation. |
| 489 webrtc::Config config; | 489 webrtc::Config config; |
| 490 if (goog_experimental_aec) | 490 if (goog_experimental_aec) |
| 491 config.Set<webrtc::DelayCorrection>(new webrtc::DelayCorrection(true)); | 491 config.Set<webrtc::ExtendedFilter>(new webrtc::ExtendedFilter(true)); |
| 492 if (goog_experimental_ns) | 492 if (goog_experimental_ns) |
| 493 config.Set<webrtc::ExperimentalNs>(new webrtc::ExperimentalNs(true)); | 493 config.Set<webrtc::ExperimentalNs>(new webrtc::ExperimentalNs(true)); |
| 494 if (IsDelayAgnosticAecEnabled()) | 494 if (IsDelayAgnosticAecEnabled()) |
| 495 config.Set<webrtc::ReportedDelay>(new webrtc::ReportedDelay(false)); | 495 config.Set<webrtc::ReportedDelay>(new webrtc::ReportedDelay(false)); |
| 496 if (goog_beamforming) { | 496 if (goog_beamforming) { |
| 497 ConfigureBeamforming(&config, audio_constraints.GetPropertyAsString( | 497 ConfigureBeamforming(&config, audio_constraints.GetPropertyAsString( |
| 498 MediaAudioConstraints::kGoogArrayGeometry)); | 498 MediaAudioConstraints::kGoogArrayGeometry)); |
| 499 } | 499 } |
| 500 config.Set<webrtc::AudioProcessing48kHzSupport>( | 500 config.Set<webrtc::AudioProcessing48kHzSupport>( |
| 501 new webrtc::AudioProcessing48kHzSupport(audio_proc_48kHz_support_)); | 501 new webrtc::AudioProcessing48kHzSupport(audio_proc_48kHz_support_)); |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 737 if (echo_information_) { | 737 if (echo_information_) { |
| 738 echo_information_.get()->UpdateAecDelayStats(ap->echo_cancellation()); | 738 echo_information_.get()->UpdateAecDelayStats(ap->echo_cancellation()); |
| 739 } | 739 } |
| 740 | 740 |
| 741 // Return 0 if the volume hasn't been changed, and otherwise the new volume. | 741 // Return 0 if the volume hasn't been changed, and otherwise the new volume. |
| 742 return (agc->stream_analog_level() == volume) ? | 742 return (agc->stream_analog_level() == volume) ? |
| 743 0 : agc->stream_analog_level(); | 743 0 : agc->stream_analog_level(); |
| 744 } | 744 } |
| 745 | 745 |
| 746 } // namespace content | 746 } // namespace content |
| OLD | NEW |