OLD | NEW |
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 "base/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 input_params.channel_layout = media::CHANNEL_LAYOUT_STEREO; | 206 input_params.channel_layout = media::CHANNEL_LAYOUT_STEREO; |
207 } else { | 207 } else { |
208 // Get the preferred sample rate and channel configuration for the | 208 // Get the preferred sample rate and channel configuration for the |
209 // audio device. | 209 // audio device. |
210 media::AudioParameters params = | 210 media::AudioParameters params = |
211 audio_manager_->GetInputStreamParameters(info.device.id); | 211 audio_manager_->GetInputStreamParameters(info.device.id); |
212 input_params.sample_rate = params.sample_rate(); | 212 input_params.sample_rate = params.sample_rate(); |
213 input_params.channel_layout = params.channel_layout(); | 213 input_params.channel_layout = params.channel_layout(); |
214 input_params.frames_per_buffer = params.frames_per_buffer(); | 214 input_params.frames_per_buffer = params.frames_per_buffer(); |
215 input_params.effects = params.effects(); | 215 input_params.effects = params.effects(); |
| 216 input_params.mic_positions = params.mic_positions(); |
216 | 217 |
217 // Add preferred output device information if a matching output device | 218 // Add preferred output device information if a matching output device |
218 // exists. | 219 // exists. |
219 out.device.matched_output_device_id = | 220 out.device.matched_output_device_id = |
220 audio_manager_->GetAssociatedOutputDeviceID(info.device.id); | 221 audio_manager_->GetAssociatedOutputDeviceID(info.device.id); |
221 if (!out.device.matched_output_device_id.empty()) { | 222 if (!out.device.matched_output_device_id.empty()) { |
222 params = audio_manager_->GetOutputStreamParameters( | 223 params = audio_manager_->GetOutputStreamParameters( |
223 out.device.matched_output_device_id); | 224 out.device.matched_output_device_id); |
224 MediaStreamDevice::AudioDeviceParameters& matched_output_params = | 225 MediaStreamDevice::AudioDeviceParameters& matched_output_params = |
225 out.device.matched_output; | 226 out.device.matched_output; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 #if defined(OS_CHROMEOS) | 298 #if defined(OS_CHROMEOS) |
298 void AudioInputDeviceManager::SetKeyboardMicStreamActiveOnUIThread( | 299 void AudioInputDeviceManager::SetKeyboardMicStreamActiveOnUIThread( |
299 bool active) { | 300 bool active) { |
300 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 301 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
301 chromeos::CrasAudioHandler::Get()->SetKeyboardMicActive(active); | 302 chromeos::CrasAudioHandler::Get()->SetKeyboardMicActive(active); |
302 } | 303 } |
303 #endif | 304 #endif |
304 | 305 |
305 | 306 |
306 } // namespace content | 307 } // namespace content |
OLD | NEW |