Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(587)

Side by Side Diff: media/audio/linux/alsa_wrapper.cc

Issue 2008010: Fixes in AlsaPcmOutputStream. (Closed)
Patch Set: - Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 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 }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } 60 }
61 61
62 int AlsaWrapper::PcmSetParams(snd_pcm_t* handle, snd_pcm_format_t format, 62 int AlsaWrapper::PcmSetParams(snd_pcm_t* handle, snd_pcm_format_t format,
63 snd_pcm_access_t access, unsigned int channels, 63 snd_pcm_access_t access, unsigned int channels,
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 int AlsaWrapper::PcmGetParams(snd_pcm_t* handle, snd_pcm_uframes_t* buffer_size,
71 snd_pcm_uframes_t* period_size) {
72 return snd_pcm_get_params(handle, buffer_size, period_size);
73 }
74
70 snd_pcm_sframes_t AlsaWrapper::PcmAvailUpdate(snd_pcm_t* handle) { 75 snd_pcm_sframes_t AlsaWrapper::PcmAvailUpdate(snd_pcm_t* handle) {
71 return snd_pcm_avail_update(handle); 76 return snd_pcm_avail_update(handle);
72 } 77 }
73 78
74 snd_pcm_state_t AlsaWrapper::PcmState(snd_pcm_t* handle) { 79 snd_pcm_state_t AlsaWrapper::PcmState(snd_pcm_t* handle) {
75 return snd_pcm_state(handle); 80 return snd_pcm_state(handle);
76 } 81 }
77 82
78 const char* AlsaWrapper::StrError(int errnum) { 83 const char* AlsaWrapper::StrError(int errnum) {
79 return snd_strerror(errnum); 84 return snd_strerror(errnum);
80 } 85 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698