| 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( | 16 FakeAudioManager::FakeAudioManager(AudioLogFactory* audio_log_factory) |
| 17 scoped_refptr<base::SingleThreadTaskRunner> task_runner, | 17 : AudioManagerBase(audio_log_factory) {} |
| 18 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner, | |
| 19 AudioLogFactory* audio_log_factory) | |
| 20 : AudioManagerBase(std::move(task_runner), | |
| 21 std::move(worker_task_runner), | |
| 22 audio_log_factory) { | |
| 23 LOG(INFO) << __FUNCTION__; | |
| 24 } | |
| 25 | 18 |
| 26 FakeAudioManager::~FakeAudioManager() { | 19 FakeAudioManager::~FakeAudioManager() { |
| 27 LOG(INFO) << __FUNCTION__; | |
| 28 Shutdown(); | 20 Shutdown(); |
| 29 } | 21 } |
| 30 | 22 |
| 31 // Implementation of AudioManager. | 23 // Implementation of AudioManager. |
| 32 bool FakeAudioManager::HasAudioOutputDevices() { return false; } | 24 bool FakeAudioManager::HasAudioOutputDevices() { return false; } |
| 33 | 25 |
| 34 bool FakeAudioManager::HasAudioInputDevices() { return false; } | 26 bool FakeAudioManager::HasAudioInputDevices() { return false; } |
| 35 | 27 |
| 36 // Implementation of AudioManagerBase. | 28 // Implementation of AudioManagerBase. |
| 37 AudioOutputStream* FakeAudioManager::MakeLinearOutputStream( | 29 AudioOutputStream* FakeAudioManager::MakeLinearOutputStream( |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 } | 70 } |
| 79 | 71 |
| 80 AudioParameters FakeAudioManager::GetInputStreamParameters( | 72 AudioParameters FakeAudioManager::GetInputStreamParameters( |
| 81 const std::string& device_id) { | 73 const std::string& device_id) { |
| 82 return AudioParameters( | 74 return AudioParameters( |
| 83 AudioParameters::AUDIO_PCM_LOW_LATENCY, CHANNEL_LAYOUT_STEREO, | 75 AudioParameters::AUDIO_PCM_LOW_LATENCY, CHANNEL_LAYOUT_STEREO, |
| 84 kDefaultSampleRate, 16, kDefaultInputBufferSize); | 76 kDefaultSampleRate, 16, kDefaultInputBufferSize); |
| 85 } | 77 } |
| 86 | 78 |
| 87 } // namespace media | 79 } // namespace media |
| OLD | NEW |