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