| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/linux/alsa_wrapper.h" | 5 #include "media/audio/linux/alsa_wrapper.h" |
| 6 | 6 |
| 7 #include <alsa/asoundlib.h> | 7 #include <alsa/asoundlib.h> |
| 8 | 8 |
| 9 AlsaWrapper::AlsaWrapper() { | 9 AlsaWrapper::AlsaWrapper() { |
| 10 } | 10 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 } | 22 } |
| 23 | 23 |
| 24 char* AlsaWrapper::DeviceNameGetHint(const void* hint, const char* id) { | 24 char* AlsaWrapper::DeviceNameGetHint(const void* hint, const char* id) { |
| 25 return snd_device_name_get_hint(hint, id); | 25 return snd_device_name_get_hint(hint, id); |
| 26 } | 26 } |
| 27 | 27 |
| 28 int AlsaWrapper::DeviceNameFreeHint(void** hints) { | 28 int AlsaWrapper::DeviceNameFreeHint(void** hints) { |
| 29 return snd_device_name_free_hint(hints); | 29 return snd_device_name_free_hint(hints); |
| 30 } | 30 } |
| 31 | 31 |
| 32 int AlsaWrapper::CardNext(int* rcard) { |
| 33 return snd_card_next(rcard); |
| 34 } |
| 35 |
| 32 int AlsaWrapper::PcmClose(snd_pcm_t* handle) { | 36 int AlsaWrapper::PcmClose(snd_pcm_t* handle) { |
| 33 return snd_pcm_close(handle); | 37 return snd_pcm_close(handle); |
| 34 } | 38 } |
| 35 | 39 |
| 36 int AlsaWrapper::PcmPrepare(snd_pcm_t* handle) { | 40 int AlsaWrapper::PcmPrepare(snd_pcm_t* handle) { |
| 37 return snd_pcm_prepare(handle); | 41 return snd_pcm_prepare(handle); |
| 38 } | 42 } |
| 39 | 43 |
| 40 int AlsaWrapper::PcmDrop(snd_pcm_t* handle) { | 44 int AlsaWrapper::PcmDrop(snd_pcm_t* handle) { |
| 41 return snd_pcm_drop(handle); | 45 return snd_pcm_drop(handle); |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 } | 155 } |
| 152 | 156 |
| 153 const char* AlsaWrapper::StrError(int errnum) { | 157 const char* AlsaWrapper::StrError(int errnum) { |
| 154 return snd_strerror(errnum); | 158 return snd_strerror(errnum); |
| 155 } | 159 } |
| 156 | 160 |
| 157 int AlsaWrapper::PcmStart(snd_pcm_t* handle) { | 161 int AlsaWrapper::PcmStart(snd_pcm_t* handle) { |
| 158 return snd_pcm_start(handle); | 162 return snd_pcm_start(handle); |
| 159 } | 163 } |
| 160 | 164 |
| OLD | NEW |