OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/fake_audio_manager.h" | 5 #include "media/audio/fake_audio_manager.h" |
6 | 6 |
7 namespace media { | 7 namespace media { |
8 | 8 |
9 namespace { | 9 namespace { |
10 | 10 |
11 const int kDefaultInputBufferSize = 1024; | 11 const int kDefaultInputBufferSize = 1024; |
12 const int kDefaultSampleRate = 48000; | 12 const int kDefaultSampleRate = 48000; |
13 | 13 |
14 } // namespace | 14 } // namespace |
15 | 15 |
16 FakeAudioManager::FakeAudioManager(AudioLogFactory* audio_log_factory) | 16 FakeAudioManager::FakeAudioManager(AudioLogFactory* audio_log_factory) |
17 : AudioManagerBase(audio_log_factory) {} | 17 : AudioManagerBase(audio_log_factory) {} |
18 | 18 |
19 FakeAudioManager::~FakeAudioManager() { | 19 FakeAudioManager::~FakeAudioManager() { |
20 Shutdown(); | 20 Shutdown(); |
21 } | 21 } |
22 | 22 |
23 // Implementation of AudioManager. | 23 // Implementation of AudioManager. |
24 bool FakeAudioManager::HasAudioOutputDevices() { return false; } | 24 bool FakeAudioManager::HasAudioOutputDevices() { return false; } |
25 | 25 |
26 bool FakeAudioManager::HasAudioInputDevices() { return false; } | 26 bool FakeAudioManager::HasAudioInputDevices() { return false; } |
27 | 27 |
| 28 void FakeAudioManager::SetHasInputDevices(bool has_input_devices) {} |
| 29 |
| 30 |
28 // Implementation of AudioManagerBase. | 31 // Implementation of AudioManagerBase. |
29 AudioOutputStream* FakeAudioManager::MakeLinearOutputStream( | 32 AudioOutputStream* FakeAudioManager::MakeLinearOutputStream( |
30 const AudioParameters& params) { | 33 const AudioParameters& params) { |
31 return FakeAudioOutputStream::MakeFakeStream(this, params); | 34 return FakeAudioOutputStream::MakeFakeStream(this, params); |
32 } | 35 } |
33 | 36 |
34 AudioOutputStream* FakeAudioManager::MakeLowLatencyOutputStream( | 37 AudioOutputStream* FakeAudioManager::MakeLowLatencyOutputStream( |
35 const AudioParameters& params, | 38 const AudioParameters& params, |
36 const std::string& device_id) { | 39 const std::string& device_id) { |
37 return FakeAudioOutputStream::MakeFakeStream(this, params); | 40 return FakeAudioOutputStream::MakeFakeStream(this, params); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 } | 74 } |
72 | 75 |
73 AudioParameters FakeAudioManager::GetInputStreamParameters( | 76 AudioParameters FakeAudioManager::GetInputStreamParameters( |
74 const std::string& device_id) { | 77 const std::string& device_id) { |
75 return AudioParameters( | 78 return AudioParameters( |
76 AudioParameters::AUDIO_PCM_LOW_LATENCY, CHANNEL_LAYOUT_STEREO, | 79 AudioParameters::AUDIO_PCM_LOW_LATENCY, CHANNEL_LAYOUT_STEREO, |
77 kDefaultSampleRate, 16, kDefaultInputBufferSize); | 80 kDefaultSampleRate, 16, kDefaultInputBufferSize); |
78 } | 81 } |
79 | 82 |
80 } // namespace media | 83 } // namespace media |
OLD | NEW |