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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 #endif | 98 #endif |
97 | 99 |
98 NOTIMPLEMENTED(); | 100 NOTIMPLEMENTED(); |
99 return NULL; | 101 return NULL; |
100 } | 102 } |
101 | 103 |
102 // static | 104 // static |
103 AudioManager* CreateAudioManager() { | 105 AudioManager* CreateAudioManager() { |
104 return new AudioManagerOpenBSD(); | 106 return new AudioManagerOpenBSD(); |
105 } | 107 } |
| 108 |
| 109 } // namespace media |
OLD | NEW |