OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_OPENBSD_AUDIO_MANAGER_OPENBSD_H_ | 5 #ifndef MEDIA_AUDIO_OPENBSD_AUDIO_MANAGER_OPENBSD_H_ |
6 #define MEDIA_AUDIO_OPENBSD_AUDIO_MANAGER_OPENBSD_H_ | 6 #define MEDIA_AUDIO_OPENBSD_AUDIO_MANAGER_OPENBSD_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "media/audio/audio_manager_base.h" | 11 #include "media/audio/audio_manager_base.h" |
12 | 12 |
13 namespace media { | 13 namespace media { |
14 | 14 |
15 class MEDIA_EXPORT AudioManagerOpenBSD : public AudioManagerBase { | 15 class MEDIA_EXPORT AudioManagerOpenBSD : public AudioManagerBase { |
16 public: | 16 public: |
17 AudioManagerOpenBSD(); | 17 AudioManagerOpenBSD(); |
18 | 18 |
19 // Implementation of AudioManager. | 19 // Implementation of AudioManager. |
20 virtual bool HasAudioOutputDevices() OVERRIDE; | 20 virtual bool HasAudioOutputDevices() OVERRIDE; |
21 virtual bool HasAudioInputDevices() OVERRIDE; | 21 virtual bool HasAudioInputDevices() OVERRIDE; |
22 virtual AudioParameters GetInputStreamParameters( | 22 virtual AudioParameters GetInputStreamParameters( |
23 const std::string& device_id) OVERRIDE; | 23 const std::string& device_id) OVERRIDE; |
24 | 24 |
25 // Implementation of AudioManagerBase. | 25 // Implementation of AudioManagerBase. |
26 virtual AudioOutputStream* MakeLinearOutputStream( | 26 virtual AudioOutputStream* MakeLinearOutputStream( |
27 const AudioParameters& params) OVERRIDE; | 27 const AudioParameters& params) OVERRIDE; |
28 virtual AudioOutputStream* MakeLowLatencyOutputStream( | 28 virtual AudioOutputStream* MakeLowLatencyOutputStream( |
29 const AudioParameters& params) OVERRIDE; | 29 const AudioParameters& params, |
| 30 const std::string& input_device_id) OVERRIDE; |
30 virtual AudioInputStream* MakeLinearInputStream( | 31 virtual AudioInputStream* MakeLinearInputStream( |
31 const AudioParameters& params, const std::string& device_id) OVERRIDE; | 32 const AudioParameters& params, const std::string& device_id) OVERRIDE; |
32 virtual AudioInputStream* MakeLowLatencyInputStream( | 33 virtual AudioInputStream* MakeLowLatencyInputStream( |
33 const AudioParameters& params, const std::string& device_id) OVERRIDE; | 34 const AudioParameters& params, const std::string& device_id) OVERRIDE; |
34 | 35 |
35 protected: | 36 protected: |
36 virtual ~AudioManagerOpenBSD(); | 37 virtual ~AudioManagerOpenBSD(); |
37 | 38 |
38 virtual AudioParameters GetPreferredOutputStreamParameters( | 39 virtual AudioParameters GetPreferredOutputStreamParameters( |
39 const AudioParameters& input_params) OVERRIDE; | 40 const AudioParameters& input_params) OVERRIDE; |
40 | 41 |
41 private: | 42 private: |
42 // Called by MakeLinearOutputStream and MakeLowLatencyOutputStream. | 43 // Called by MakeLinearOutputStream and MakeLowLatencyOutputStream. |
43 AudioOutputStream* MakeOutputStream(const AudioParameters& params); | 44 AudioOutputStream* MakeOutputStream(const AudioParameters& params); |
44 | 45 |
45 // Flag to indicate whether the pulse library has been initialized or not. | 46 // Flag to indicate whether the pulse library has been initialized or not. |
46 bool pulse_library_is_initialized_; | 47 bool pulse_library_is_initialized_; |
47 | 48 |
48 DISALLOW_COPY_AND_ASSIGN(AudioManagerOpenBSD); | 49 DISALLOW_COPY_AND_ASSIGN(AudioManagerOpenBSD); |
49 }; | 50 }; |
50 | 51 |
51 } // namespace media | 52 } // namespace media |
52 | 53 |
53 #endif // MEDIA_AUDIO_OPENBSD_AUDIO_MANAGER_OPENBSD_H_ | 54 #endif // MEDIA_AUDIO_OPENBSD_AUDIO_MANAGER_OPENBSD_H_ |
OLD | NEW |