OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 } |
11 | 11 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 unsigned int rate, int soft_resample, | 64 unsigned int rate, int soft_resample, |
65 unsigned int latency) { | 65 unsigned int latency) { |
66 return snd_pcm_set_params(handle, format, access, channels, rate, | 66 return snd_pcm_set_params(handle, format, access, channels, rate, |
67 soft_resample, latency); | 67 soft_resample, latency); |
68 } | 68 } |
69 | 69 |
70 snd_pcm_sframes_t AlsaWrapper::PcmAvailUpdate(snd_pcm_t* handle) { | 70 snd_pcm_sframes_t AlsaWrapper::PcmAvailUpdate(snd_pcm_t* handle) { |
71 return snd_pcm_avail_update(handle); | 71 return snd_pcm_avail_update(handle); |
72 } | 72 } |
73 | 73 |
| 74 snd_pcm_state_t AlsaWrapper::PcmState(snd_pcm_t* handle) { |
| 75 return snd_pcm_state(handle); |
| 76 } |
| 77 |
74 const char* AlsaWrapper::StrError(int errnum) { | 78 const char* AlsaWrapper::StrError(int errnum) { |
75 return snd_strerror(errnum); | 79 return snd_strerror(errnum); |
76 } | 80 } |
OLD | NEW |