OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/alsa/alsa_util.h" | 5 #include "media/audio/alsa/alsa_util.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include "base/logging.h" | 9 #include "base/logging.h" |
8 #include "media/audio/alsa/alsa_wrapper.h" | 10 #include "media/audio/alsa/alsa_wrapper.h" |
9 | 11 |
10 namespace alsa_util { | 12 namespace alsa_util { |
11 | 13 |
12 static snd_pcm_t* OpenDevice(media::AlsaWrapper* wrapper, | 14 static snd_pcm_t* OpenDevice(media::AlsaWrapper* wrapper, |
13 const char* device_name, | 15 const char* device_name, |
14 snd_pcm_stream_t type, | 16 snd_pcm_stream_t type, |
15 int channels, | 17 int channels, |
16 int sample_rate, | 18 int sample_rate, |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 else if (strcmp(elem_name, kMicElemName) == 0) | 191 else if (strcmp(elem_name, kMicElemName) == 0) |
190 mic_elem = elem; | 192 mic_elem = elem; |
191 } | 193 } |
192 } | 194 } |
193 | 195 |
194 // Did not find any Capture handle, use the Mic handle. | 196 // Did not find any Capture handle, use the Mic handle. |
195 return mic_elem; | 197 return mic_elem; |
196 } | 198 } |
197 | 199 |
198 } // namespace alsa_util | 200 } // namespace alsa_util |
OLD | NEW |