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
3 // found in the LICENSE file.
5 #include "media/audio/mock_audio_manager.h"
7 #include "base/logging.h"
8 #include "base/message_loop/message_loop_proxy.h"
9 #include "media/audio/audio_parameters.h"
13 MockAudioManager::MockAudioManager(base::MessageLoopProxy
* message_loop_proxy
)
14 : message_loop_proxy_(message_loop_proxy
) {
17 MockAudioManager::~MockAudioManager() {
20 bool MockAudioManager::HasAudioOutputDevices() {
24 bool MockAudioManager::HasAudioInputDevices() {
28 string16
MockAudioManager::GetAudioInputDeviceModel() {
32 void MockAudioManager::ShowAudioInputSettings() {
35 void MockAudioManager::GetAudioInputDeviceNames(
36 AudioDeviceNames
* device_names
) {
39 void MockAudioManager::GetAudioOutputDeviceNames(
40 AudioDeviceNames
* device_names
) {
43 media::AudioOutputStream
* MockAudioManager::MakeAudioOutputStream(
44 const media::AudioParameters
& params
,
45 const std::string
& device_id
,
46 const std::string
& input_device_id
) {
51 media::AudioOutputStream
* MockAudioManager::MakeAudioOutputStreamProxy(
52 const media::AudioParameters
& params
,
53 const std::string
& device_id
,
54 const std::string
& input_device_id
) {
59 media::AudioInputStream
* MockAudioManager::MakeAudioInputStream(
60 const media::AudioParameters
& params
,
61 const std::string
& device_id
) {
66 scoped_refptr
<base::MessageLoopProxy
> MockAudioManager::GetMessageLoop() {
67 return message_loop_proxy_
;
70 scoped_refptr
<base::MessageLoopProxy
> MockAudioManager::GetWorkerLoop() {
71 return message_loop_proxy_
;
74 void MockAudioManager::AddOutputDeviceChangeListener(
75 AudioDeviceListener
* listener
) {
78 void MockAudioManager::RemoveOutputDeviceChangeListener(
79 AudioDeviceListener
* listener
) {
82 AudioParameters
MockAudioManager::GetDefaultOutputStreamParameters() {
83 return AudioParameters();
86 AudioParameters
MockAudioManager::GetOutputStreamParameters(
87 const std::string
& device_id
) {
88 return AudioParameters();
91 AudioParameters
MockAudioManager::GetInputStreamParameters(
92 const std::string
& device_id
) {
93 return AudioParameters();
96 std::string
MockAudioManager::GetAssociatedOutputDeviceID(
97 const std::string
& input_device_id
) {
101 } // namespace media.