| 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 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 namespace media { | 10 namespace media { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 FakeAudioManager::~FakeAudioManager() { | 28 FakeAudioManager::~FakeAudioManager() { |
| 29 Shutdown(); | 29 Shutdown(); |
| 30 } | 30 } |
| 31 | 31 |
| 32 // Implementation of AudioManager. | 32 // Implementation of AudioManager. |
| 33 bool FakeAudioManager::HasAudioOutputDevices() { return false; } | 33 bool FakeAudioManager::HasAudioOutputDevices() { return false; } |
| 34 | 34 |
| 35 bool FakeAudioManager::HasAudioInputDevices() { return false; } | 35 bool FakeAudioManager::HasAudioInputDevices() { return false; } |
| 36 | 36 |
| 37 const char* FakeAudioManager::GetName() { |
| 38 return "Fake"; |
| 39 } |
| 40 |
| 37 // Implementation of AudioManagerBase. | 41 // Implementation of AudioManagerBase. |
| 38 AudioOutputStream* FakeAudioManager::MakeLinearOutputStream( | 42 AudioOutputStream* FakeAudioManager::MakeLinearOutputStream( |
| 39 const AudioParameters& params, | 43 const AudioParameters& params, |
| 40 const LogCallback& log_callback) { | 44 const LogCallback& log_callback) { |
| 41 return FakeAudioOutputStream::MakeFakeStream(this, params); | 45 return FakeAudioOutputStream::MakeFakeStream(this, params); |
| 42 } | 46 } |
| 43 | 47 |
| 44 AudioOutputStream* FakeAudioManager::MakeLowLatencyOutputStream( | 48 AudioOutputStream* FakeAudioManager::MakeLowLatencyOutputStream( |
| 45 const AudioParameters& params, | 49 const AudioParameters& params, |
| 46 const std::string& device_id, | 50 const std::string& device_id, |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 } | 87 } |
| 84 | 88 |
| 85 AudioParameters FakeAudioManager::GetInputStreamParameters( | 89 AudioParameters FakeAudioManager::GetInputStreamParameters( |
| 86 const std::string& device_id) { | 90 const std::string& device_id) { |
| 87 return AudioParameters( | 91 return AudioParameters( |
| 88 AudioParameters::AUDIO_PCM_LOW_LATENCY, CHANNEL_LAYOUT_STEREO, | 92 AudioParameters::AUDIO_PCM_LOW_LATENCY, CHANNEL_LAYOUT_STEREO, |
| 89 kDefaultSampleRate, 16, kDefaultInputBufferSize); | 93 kDefaultSampleRate, 16, kDefaultInputBufferSize); |
| 90 } | 94 } |
| 91 | 95 |
| 92 } // namespace media | 96 } // namespace media |
| OLD | NEW |