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/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
150 const media::AudioParameters sink_params_; | 150 const media::AudioParameters sink_params_; |
151 | 151 |
152 // TODO(xians): consider using SincResampler to save some memcpy. | 152 // TODO(xians): consider using SincResampler to save some memcpy. |
153 // Handles mixing and resampling between input and output parameters. | 153 // Handles mixing and resampling between input and output parameters. |
154 media::AudioConverter audio_converter_; | 154 media::AudioConverter audio_converter_; |
155 scoped_ptr<media::AudioBus> audio_wrapper_; | 155 scoped_ptr<media::AudioBus> audio_wrapper_; |
156 scoped_ptr<media::AudioFifo> fifo_; | 156 scoped_ptr<media::AudioFifo> fifo_; |
157 }; | 157 }; |
158 | 158 |
159 bool MediaStreamAudioProcessor::IsAudioTrackProcessingEnabled() { | 159 bool MediaStreamAudioProcessor::IsAudioTrackProcessingEnabled() { |
160 const std::string group_name = | 160 return !CommandLine::ForCurrentProcess()->HasSwitch( |
161 base::FieldTrialList::FindFullName("MediaStreamAudioTrackProcessing"); | 161 switches::kDisableAudioTrackProcessing); |
jochen (gone - plz use gerrit)
2014/05/21 08:53:14
can you now drop some #includes?
no longer working on chromium
2014/05/26 10:02:16
Done.
| |
162 return group_name == "Enabled" || CommandLine::ForCurrentProcess()->HasSwitch( | |
163 switches::kEnableAudioTrackProcessing); | |
164 } | 162 } |
165 | 163 |
166 MediaStreamAudioProcessor::MediaStreamAudioProcessor( | 164 MediaStreamAudioProcessor::MediaStreamAudioProcessor( |
167 const blink::WebMediaConstraints& constraints, | 165 const blink::WebMediaConstraints& constraints, |
168 int effects, | 166 int effects, |
169 WebRtcPlayoutDataSource* playout_data_source) | 167 WebRtcPlayoutDataSource* playout_data_source) |
170 : render_delay_ms_(0), | 168 : render_delay_ms_(0), |
171 playout_data_source_(playout_data_source), | 169 playout_data_source_(playout_data_source), |
172 audio_mirroring_(false), | 170 audio_mirroring_(false), |
173 typing_detected_(false) { | 171 typing_detected_(false) { |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
494 | 492 |
495 StopAecDump(); | 493 StopAecDump(); |
496 | 494 |
497 if (playout_data_source_) | 495 if (playout_data_source_) |
498 playout_data_source_->RemovePlayoutSink(this); | 496 playout_data_source_->RemovePlayoutSink(this); |
499 | 497 |
500 audio_processing_.reset(); | 498 audio_processing_.reset(); |
501 } | 499 } |
502 | 500 |
503 } // namespace content | 501 } // namespace content |
OLD | NEW |