| 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 "media/audio/audio_manager_base.h" | 5 #include "media/audio/audio_manager_base.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 << "audio path. Channels: " << output_params.channels() << ", " | 259 << "audio path. Channels: " << output_params.channels() << ", " |
| 260 << "Sample Rate: " << output_params.sample_rate() << ", " | 260 << "Sample Rate: " << output_params.sample_rate() << ", " |
| 261 << "Bits Per Sample: " << output_params.bits_per_sample() | 261 << "Bits Per Sample: " << output_params.bits_per_sample() |
| 262 << ", Frames Per Buffer: " | 262 << ", Frames Per Buffer: " |
| 263 << output_params.frames_per_buffer(); | 263 << output_params.frames_per_buffer(); |
| 264 | 264 |
| 265 // Tell the AudioManager to create a fake output device. | 265 // Tell the AudioManager to create a fake output device. |
| 266 output_params = AudioParameters( | 266 output_params = AudioParameters( |
| 267 AudioParameters::AUDIO_FAKE, params.channel_layout(), | 267 AudioParameters::AUDIO_FAKE, params.channel_layout(), |
| 268 params.sample_rate(), params.bits_per_sample(), | 268 params.sample_rate(), params.bits_per_sample(), |
| 269 params.frames_per_buffer(), params.effects()); | 269 params.frames_per_buffer(), params.mic_positions(), params.effects()); |
| 270 } else if (params.effects() != output_params.effects()) { | 270 } else if (params.effects() != output_params.effects()) { |
| 271 // Turn off effects that weren't requested. | 271 // Turn off effects that weren't requested. |
| 272 output_params = AudioParameters( | 272 output_params = AudioParameters( |
| 273 output_params.format(), output_params.channel_layout(), | 273 output_params.format(), output_params.channels(), |
| 274 output_params.channels(), output_params.sample_rate(), | 274 output_params.channel_layout(), output_params.sample_rate(), |
| 275 output_params.bits_per_sample(), output_params.frames_per_buffer(), | 275 output_params.bits_per_sample(), output_params.frames_per_buffer(), |
| 276 output_params.mic_positions(), |
| 276 params.effects() & output_params.effects()); | 277 params.effects() & output_params.effects()); |
| 277 } | 278 } |
| 278 } | 279 } |
| 279 | 280 |
| 280 DispatcherParams* dispatcher_params = | 281 DispatcherParams* dispatcher_params = |
| 281 new DispatcherParams(params, output_params, output_device_id); | 282 new DispatcherParams(params, output_params, output_device_id); |
| 282 | 283 |
| 283 AudioOutputDispatchers::iterator it = | 284 AudioOutputDispatchers::iterator it = |
| 284 std::find_if(output_dispatchers_.begin(), output_dispatchers_.end(), | 285 std::find_if(output_dispatchers_.begin(), output_dispatchers_.end(), |
| 285 CompareByParams(dispatcher_params)); | 286 CompareByParams(dispatcher_params)); |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 scoped_ptr<AudioLog> AudioManagerBase::CreateAudioLog( | 414 scoped_ptr<AudioLog> AudioManagerBase::CreateAudioLog( |
| 414 AudioLogFactory::AudioComponent component) { | 415 AudioLogFactory::AudioComponent component) { |
| 415 return audio_log_factory_->CreateAudioLog(component); | 416 return audio_log_factory_->CreateAudioLog(component); |
| 416 } | 417 } |
| 417 | 418 |
| 418 void AudioManagerBase::SetHasKeyboardMic() { | 419 void AudioManagerBase::SetHasKeyboardMic() { |
| 419 NOTREACHED(); | 420 NOTREACHED(); |
| 420 } | 421 } |
| 421 | 422 |
| 422 } // namespace media | 423 } // namespace media |
| OLD | NEW |