| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 | 538 |
| 539 void MediaStreamAudioProcessor::OnRenderThreadChanged() { | 539 void MediaStreamAudioProcessor::OnRenderThreadChanged() { |
| 540 render_thread_checker_.DetachFromThread(); | 540 render_thread_checker_.DetachFromThread(); |
| 541 DCHECK(render_thread_checker_.CalledOnValidThread()); | 541 DCHECK(render_thread_checker_.CalledOnValidThread()); |
| 542 render_fifo_->ReattachThreadChecker(); | 542 render_fifo_->ReattachThreadChecker(); |
| 543 } | 543 } |
| 544 | 544 |
| 545 void MediaStreamAudioProcessor::GetStats(AudioProcessorStats* stats) { | 545 void MediaStreamAudioProcessor::GetStats(AudioProcessorStats* stats) { |
| 546 stats->typing_noise_detected = | 546 stats->typing_noise_detected = |
| 547 (base::subtle::Acquire_Load(&typing_detected_) != false); | 547 (base::subtle::Acquire_Load(&typing_detected_) != false); |
| 548 GetAecStats(audio_processing_.get()->echo_cancellation(), stats); | 548 GetAudioProcessingStats(audio_processing_.get(), stats); |
| 549 } | 549 } |
| 550 | 550 |
| 551 void MediaStreamAudioProcessor::InitializeAudioProcessingModule( | 551 void MediaStreamAudioProcessor::InitializeAudioProcessingModule( |
| 552 const blink::WebMediaConstraints& constraints, | 552 const blink::WebMediaConstraints& constraints, |
| 553 const MediaStreamDevice::AudioDeviceParameters& input_params) { | 553 const MediaStreamDevice::AudioDeviceParameters& input_params) { |
| 554 DCHECK(main_thread_runner_->BelongsToCurrentThread()); | 554 DCHECK(main_thread_runner_->BelongsToCurrentThread()); |
| 555 DCHECK(!audio_processing_); | 555 DCHECK(!audio_processing_); |
| 556 | 556 |
| 557 MediaAudioConstraints audio_constraints(constraints, input_params.effects); | 557 MediaAudioConstraints audio_constraints(constraints, input_params.effects); |
| 558 | 558 |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 826 0 : agc->stream_analog_level(); | 826 0 : agc->stream_analog_level(); |
| 827 } | 827 } |
| 828 | 828 |
| 829 void MediaStreamAudioProcessor::UpdateAecStats() { | 829 void MediaStreamAudioProcessor::UpdateAecStats() { |
| 830 DCHECK(main_thread_runner_->BelongsToCurrentThread()); | 830 DCHECK(main_thread_runner_->BelongsToCurrentThread()); |
| 831 if (echo_information_) | 831 if (echo_information_) |
| 832 echo_information_->UpdateAecStats(audio_processing_->echo_cancellation()); | 832 echo_information_->UpdateAecStats(audio_processing_->echo_cancellation()); |
| 833 } | 833 } |
| 834 | 834 |
| 835 } // namespace content | 835 } // namespace content |
| OLD | NEW |