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

Issue 1618006: Assume pending buffered bytes is zero when ALSA has underrun. (Closed)

Created:
10 years, 8 months ago by scherkus (not reviewing)
Modified:
9 years, 7 months ago
CC:
chromium-reviews, jam+cc_chromium.org, fbarchard, Paweł Hajdan Jr., darin-cc_chromium.org, awong, brettw-cc_chromium.org, scherkus (not reviewing), Alpha Left Google
Visibility:
Public.

Description

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 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=43914

Patch Set 1 #

Patch Set 2 : Copyright years #

Total comments: 8

Patch Set 3 : Revert impl #

Patch Set 4 : Tiny fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+73 lines, -16 lines) Patch
M media/audio/linux/alsa_output.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M media/audio/linux/alsa_output.cc View 1 2 3 1 chunk +18 lines, -14 lines 0 comments Download
M media/audio/linux/alsa_output_unittest.cc View 1 2 4 chunks +46 lines, -0 lines 0 comments Download
M media/audio/linux/alsa_wrapper.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M media/audio/linux/alsa_wrapper.cc View 1 2 chunks +5 lines, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
scherkus (not reviewing)
CAVEAT: I'm at home and haven't tested this patch on Windows, Mac, etc... ajwong: ALSA ...
10 years, 8 months ago (2010-04-07 07:35:22 UTC) #1
Alpha Left Google
On 2010/04/07 07:35:22, scherkus wrote: > CAVEAT: I'm at home and haven't tested this patch ...
10 years, 8 months ago (2010-04-07 19:07:47 UTC) #2
awong
http://codereview.chromium.org/1618006/diff/2001/3001 File chrome/renderer/media/audio_renderer_impl.cc (right): http://codereview.chromium.org/1618006/diff/2001/3001#newcode348 chrome/renderer/media/audio_renderer_impl.cc:348: new ViewHostMsg_NotifyAudioPacketReady(0, stream_id_, filled)); So we're sending this even ...
10 years, 8 months ago (2010-04-07 20:05:47 UTC) #3
scherkus (not reviewing)
Reverted audio_renderer_impl.cc change to keep this focused on ALSA bug. Doesn't fix the ended event ...
10 years, 8 months ago (2010-04-08 01:08:50 UTC) #4
awong
10 years, 8 months ago (2010-04-08 02:01:06 UTC) #5
LGTM

Powered by Google App Engine
This is Rietveld 408576698