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 #ifndef MEDIA_AUDIO_FAKE_AUDIO_MANAGER_H_ | 5 #ifndef MEDIA_AUDIO_FAKE_AUDIO_MANAGER_H_ |
6 #define MEDIA_AUDIO_FAKE_AUDIO_MANAGER_H_ | 6 #define MEDIA_AUDIO_FAKE_AUDIO_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "media/audio/audio_manager_base.h" | 10 #include "media/audio/audio_manager_base.h" |
11 #include "media/audio/fake_audio_input_stream.h" | 11 #include "media/audio/fake_audio_input_stream.h" |
12 #include "media/audio/fake_audio_output_stream.h" | 12 #include "media/audio/fake_audio_output_stream.h" |
13 | 13 |
14 namespace media { | 14 namespace media { |
15 | 15 |
16 class MEDIA_EXPORT FakeAudioManager : public AudioManagerBase { | 16 class MEDIA_EXPORT FakeAudioManager : public AudioManagerBase { |
17 public: | 17 public: |
18 FakeAudioManager(AudioLogFactory* audio_log_factory); | 18 FakeAudioManager(AudioLogFactory* audio_log_factory); |
19 | 19 |
20 // Implementation of AudioManager. | 20 // Implementation of AudioManager. |
21 virtual bool HasAudioOutputDevices() OVERRIDE; | 21 virtual bool HasAudioOutputDevices() OVERRIDE; |
22 virtual bool HasAudioInputDevices() OVERRIDE; | 22 virtual bool HasAudioInputDevices() OVERRIDE; |
23 | 23 |
24 // Implementation of AudioManagerBase. | 24 // Implementation of AudioManagerBase. |
25 virtual AudioOutputStream* MakeLinearOutputStream( | 25 virtual AudioOutputStream* MakeLinearOutputStream( |
26 const AudioParameters& params) OVERRIDE; | 26 const AudioParameters& params) OVERRIDE; |
27 virtual AudioOutputStream* MakeLowLatencyOutputStream( | 27 virtual AudioOutputStream* MakeLowLatencyOutputStream( |
28 const AudioParameters& params, | 28 const AudioParameters& params, |
29 const std::string& device_id, | 29 const std::string& device_id) OVERRIDE; |
30 const std::string& input_device_id) OVERRIDE; | |
31 virtual AudioInputStream* MakeLinearInputStream(const AudioParameters& params, | 30 virtual AudioInputStream* MakeLinearInputStream(const AudioParameters& params, |
32 const std::string& device_id) | 31 const std::string& device_id) |
33 OVERRIDE; | 32 OVERRIDE; |
34 virtual AudioInputStream* MakeLowLatencyInputStream( | 33 virtual AudioInputStream* MakeLowLatencyInputStream( |
35 const AudioParameters& params, | 34 const AudioParameters& params, |
36 const std::string& device_id) OVERRIDE; | 35 const std::string& device_id) OVERRIDE; |
37 virtual AudioParameters GetInputStreamParameters( | 36 virtual AudioParameters GetInputStreamParameters( |
38 const std::string& device_id) OVERRIDE; | 37 const std::string& device_id) OVERRIDE; |
39 | 38 |
40 protected: | 39 protected: |
41 virtual ~FakeAudioManager(); | 40 virtual ~FakeAudioManager(); |
42 | 41 |
43 virtual AudioParameters GetPreferredOutputStreamParameters( | 42 virtual AudioParameters GetPreferredOutputStreamParameters( |
44 const std::string& output_device_id, | 43 const std::string& output_device_id, |
45 const AudioParameters& input_params) OVERRIDE; | 44 const AudioParameters& input_params) OVERRIDE; |
46 | 45 |
47 private: | 46 private: |
48 DISALLOW_COPY_AND_ASSIGN(FakeAudioManager); | 47 DISALLOW_COPY_AND_ASSIGN(FakeAudioManager); |
49 }; | 48 }; |
50 | 49 |
51 } // namespace media | 50 } // namespace media |
52 | 51 |
53 #endif // MEDIA_AUDIO_FAKE_AUDIO_MANAGER_H_ | 52 #endif // MEDIA_AUDIO_FAKE_AUDIO_MANAGER_H_ |
OLD | NEW |