diff options
author | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-08 02:04:00 +0000 |
---|---|---|
committer | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-08 02:04:00 +0000 |
commit | fee4f34561031e3411cf09e2ff3f0142d4ac00a6 (patch) | |
tree | 0f8032c09e110d6f6b8d613402376382d5fc81aa /media/audio/linux/alsa_wrapper.h | |
parent | 3a387ae7a05a9b49394ccd15c16c19b78dbf5664 (diff) | |
download | chromium_src-fee4f34561031e3411cf09e2ff3f0142d4ac00a6.zip chromium_src-fee4f34561031e3411cf09e2ff3f0142d4ac00a6.tar.gz chromium_src-fee4f34561031e3411cf09e2ff3f0142d4ac00a6.tar.bz2 |
Assume pending buffered bytes is zero when ALSA has underrun.
According to docs, snd_pcm_delay() may not reach zero when ALSA has underrun. Furthermore it may return negative numbers when underrun, leading to an underflow when converted to uint32. Previously none of this was an issue however as of r43546 we now wait for pending buffered bytes to reach zero before notifying that the audio stream has finished.
This doesn't completely fix the Linux ended event issue, but is a required fix regardless.
BUG=30452
TEST=media_unittests
Review URL: http://codereview.chromium.org/1618006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43914 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/audio/linux/alsa_wrapper.h')
-rw-r--r-- | media/audio/linux/alsa_wrapper.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/media/audio/linux/alsa_wrapper.h b/media/audio/linux/alsa_wrapper.h index 5ab3c84..ce045ea 100644 --- a/media/audio/linux/alsa_wrapper.h +++ b/media/audio/linux/alsa_wrapper.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // @@ -35,6 +35,7 @@ class AlsaWrapper { unsigned int latency); virtual const char* PcmName(snd_pcm_t* handle); virtual snd_pcm_sframes_t PcmAvailUpdate(snd_pcm_t* handle); + virtual snd_pcm_state_t PcmState(snd_pcm_t* handle); virtual const char* StrError(int errnum); |