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