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 |
18 // Maximum number of output streams that can be open simultaneously. | 20 // Maximum number of output streams that can be open simultaneously. |
19 static const int kMaxOutputStreams = 50; | 21 static const int kMaxOutputStreams = 50; |
20 | 22 |
21 // Implementation of AudioManager. | 23 // Implementation of AudioManager. |
22 static bool HasAudioHardware() { | 24 static bool HasAudioHardware() { |
23 int fd; | 25 int fd; |
24 const char *file; | 26 const char *file; |
25 | 27 |
26 if ((file = getenv("AUDIOCTLDEVICE")) == 0 || *file == '\0') | 28 if ((file = getenv("AUDIOCTLDEVICE")) == 0 || *file == '\0') |
27 file = "/dev/audioctl"; | 29 file = "/dev/audioctl"; |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 #endif | 102 #endif |
101 | 103 |
102 NOTIMPLEMENTED(); | 104 NOTIMPLEMENTED(); |
103 return NULL; | 105 return NULL; |
104 } | 106 } |
105 | 107 |
106 // static | 108 // static |
107 AudioManager* CreateAudioManager() { | 109 AudioManager* CreateAudioManager() { |
108 return new AudioManagerOpenBSD(); | 110 return new AudioManagerOpenBSD(); |
109 } | 111 } |
| 112 |
| 113 } // namespace media |
OLD | NEW |