| 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/message_loop/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 output_listeners_.RemoveObserver(listener); | 393 output_listeners_.RemoveObserver(listener); |
| 394 } | 394 } |
| 395 | 395 |
| 396 void AudioManagerBase::NotifyAllOutputDeviceChangeListeners() { | 396 void AudioManagerBase::NotifyAllOutputDeviceChangeListeners() { |
| 397 DCHECK(message_loop_->BelongsToCurrentThread()); | 397 DCHECK(message_loop_->BelongsToCurrentThread()); |
| 398 DVLOG(1) << "Firing OnDeviceChange() notifications."; | 398 DVLOG(1) << "Firing OnDeviceChange() notifications."; |
| 399 FOR_EACH_OBSERVER(AudioDeviceListener, output_listeners_, OnDeviceChange()); | 399 FOR_EACH_OBSERVER(AudioDeviceListener, output_listeners_, OnDeviceChange()); |
| 400 } | 400 } |
| 401 | 401 |
| 402 AudioParameters AudioManagerBase::GetDefaultOutputStreamParameters() { | 402 AudioParameters AudioManagerBase::GetDefaultOutputStreamParameters() { |
| 403 return GetPreferredOutputStreamParameters("", AudioParameters()); | 403 return GetPreferredOutputStreamParameters(GetDefaultOutputDeviceID(), |
| 404 AudioParameters()); |
| 404 } | 405 } |
| 405 | 406 |
| 406 AudioParameters AudioManagerBase::GetOutputStreamParameters( | 407 AudioParameters AudioManagerBase::GetOutputStreamParameters( |
| 407 const std::string& device_id) { | 408 const std::string& device_id) { |
| 408 return GetPreferredOutputStreamParameters(device_id, | 409 return GetPreferredOutputStreamParameters(device_id, |
| 409 AudioParameters()); | 410 AudioParameters()); |
| 410 } | 411 } |
| 411 | 412 |
| 412 AudioParameters AudioManagerBase::GetInputStreamParameters( | 413 AudioParameters AudioManagerBase::GetInputStreamParameters( |
| 413 const std::string& device_id) { | 414 const std::string& device_id) { |
| 414 NOTREACHED(); | 415 NOTREACHED(); |
| 415 return AudioParameters(); | 416 return AudioParameters(); |
| 416 } | 417 } |
| 417 | 418 |
| 418 std::string AudioManagerBase::GetAssociatedOutputDeviceID( | 419 std::string AudioManagerBase::GetAssociatedOutputDeviceID( |
| 419 const std::string& input_device_id) { | 420 const std::string& input_device_id) { |
| 420 NOTIMPLEMENTED(); | 421 NOTIMPLEMENTED(); |
| 421 return ""; | 422 return ""; |
| 422 } | 423 } |
| 423 | 424 |
| 424 std::string AudioManagerBase::GetDefaultOutputDeviceID() { | 425 std::string AudioManagerBase::GetDefaultOutputDeviceID() { |
| 425 NOTIMPLEMENTED(); | 426 NOTIMPLEMENTED(); |
| 426 return ""; | 427 return ""; |
| 427 } | 428 } |
| 428 | 429 |
| 429 } // namespace media | 430 } // namespace media |
| OLD | NEW |