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 #include "media/audio/openbsd/audio_manager_openbsd.h" | 5 #include "media/audio/openbsd/audio_manager_openbsd.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "media/audio/audio_output_dispatcher.h" | 9 #include "media/audio/audio_output_dispatcher.h" |
10 #if defined(USE_PULSEAUDIO) | 10 #if defined(USE_PULSEAUDIO) |
11 #include "media/audio/pulse/pulse_output.h" | 11 #include "media/audio/pulse/pulse_output.h" |
12 #endif | 12 #endif |
13 #include "media/base/limits.h" | 13 #include "media/base/limits.h" |
14 #include "media/base/media_switches.h" | 14 #include "media/base/media_switches.h" |
15 | 15 |
16 #include <fcntl.h> | 16 #include <fcntl.h> |
17 | 17 |
18 namespace media { | |
19 | |
20 // Maximum number of output streams that can be open simultaneously. | 18 // Maximum number of output streams that can be open simultaneously. |
21 static const int kMaxOutputStreams = 50; | 19 static const int kMaxOutputStreams = 50; |
22 | 20 |
23 // Implementation of AudioManager. | 21 // Implementation of AudioManager. |
24 static bool HasAudioHardware() { | 22 static bool HasAudioHardware() { |
25 int fd; | 23 int fd; |
26 const char *file; | 24 const char *file; |
27 | 25 |
28 if ((file = getenv("AUDIOCTLDEVICE")) == 0 || *file == '\0') | 26 if ((file = getenv("AUDIOCTLDEVICE")) == 0 || *file == '\0') |
29 file = "/dev/audioctl"; | 27 file = "/dev/audioctl"; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 #endif | 96 #endif |
99 | 97 |
100 NOTIMPLEMENTED(); | 98 NOTIMPLEMENTED(); |
101 return NULL; | 99 return NULL; |
102 } | 100 } |
103 | 101 |
104 // static | 102 // static |
105 AudioManager* CreateAudioManager() { | 103 AudioManager* CreateAudioManager() { |
106 return new AudioManagerOpenBSD(); | 104 return new AudioManagerOpenBSD(); |
107 } | 105 } |
108 | |
109 } // namespace media | |
OLD | NEW |