Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Side by Side Diff: content/browser/renderer_host/media/audio_input_device_manager.cc

Issue 115413002: Enable platform echo cancellation through the AudioRecord path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/media/audio_renderer_host_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/renderer_host/media/audio_input_device_manager.h" 5 #include "content/browser/renderer_host/media/audio_input_device_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 #include "content/public/common/media_stream_request.h" 10 #include "content/public/common/media_stream_request.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 input_params.sample_rate = 44100; 180 input_params.sample_rate = 44100;
181 input_params.channel_layout = media::CHANNEL_LAYOUT_STEREO; 181 input_params.channel_layout = media::CHANNEL_LAYOUT_STEREO;
182 } else { 182 } else {
183 // Get the preferred sample rate and channel configuration for the 183 // Get the preferred sample rate and channel configuration for the
184 // audio device. 184 // audio device.
185 media::AudioParameters params = 185 media::AudioParameters params =
186 audio_manager_->GetInputStreamParameters(info.device.id); 186 audio_manager_->GetInputStreamParameters(info.device.id);
187 input_params.sample_rate = params.sample_rate(); 187 input_params.sample_rate = params.sample_rate();
188 input_params.channel_layout = params.channel_layout(); 188 input_params.channel_layout = params.channel_layout();
189 input_params.frames_per_buffer = params.frames_per_buffer(); 189 input_params.frames_per_buffer = params.frames_per_buffer();
190 input_params.effects = params.effects();
190 191
191 // Add preferred output device information if a matching output device 192 // Add preferred output device information if a matching output device
192 // exists. 193 // exists.
193 out.device.matched_output_device_id = 194 out.device.matched_output_device_id =
194 audio_manager_->GetAssociatedOutputDeviceID(info.device.id); 195 audio_manager_->GetAssociatedOutputDeviceID(info.device.id);
195 if (!out.device.matched_output_device_id.empty()) { 196 if (!out.device.matched_output_device_id.empty()) {
196 params = audio_manager_->GetOutputStreamParameters( 197 params = audio_manager_->GetOutputStreamParameters(
197 out.device.matched_output_device_id); 198 out.device.matched_output_device_id);
198 MediaStreamDevice::AudioDeviceParameters& matched_output_params = 199 MediaStreamDevice::AudioDeviceParameters& matched_output_params =
199 out.device.matched_output; 200 out.device.matched_output;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 for (StreamDeviceList::iterator i(devices_.begin()); i != devices_.end(); 249 for (StreamDeviceList::iterator i(devices_.begin()); i != devices_.end();
249 ++i) { 250 ++i) {
250 if (i->session_id == session_id) 251 if (i->session_id == session_id)
251 return i; 252 return i;
252 } 253 }
253 254
254 return devices_.end(); 255 return devices_.end();
255 } 256 }
256 257
257 } // namespace content 258 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/media/audio_renderer_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698