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

Issue 6776024: Fix Linux audio playback for short files (Closed)

Created:
9 years, 8 months ago by davejcool
Modified:
9 years, 7 months ago
CC:
chromium-reviews, hclam+watch_chromium.org, sjl, ddorwin+watch_chromium.org, fischman+watch_chromium.org, acolwell GONE FROM CHROMIUM, annacc, ajwong+watch_chromium.org, vrk (LEFT CHROMIUM), scherkus (not reviewing)
Visibility:
Public.

Description

Fix Linux audio playback Playing audio files shorter than about 11000 samples on Linux was either not working at all, or re-playing (starting and stopping on the same audio object) was working only intermittently. It was possible to stop audio playback before the first buffer was played, resulting in no sound at all. Also, if replaying, the buffer may have been dirty from the previous playback on the same device. So on Linux at least, these issues appear fixed. BUG=73045, 47761, 59367, 59369, 59370, 65618 TEST=Manual, quickly playing short audio files on Linux should work Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=81669

Patch Set 1 #

Total comments: 4

Patch Set 2 : Added some early returns #

Total comments: 2

Patch Set 3 : fixup unittest #

Patch Set 4 : copyright #

Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -2 lines) Patch
M media/audio/linux/alsa_output.cc View 1 2 4 chunks +24 lines, -0 lines 0 comments Download
M media/audio/linux/alsa_output_unittest.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
davejcool
9 years, 8 months ago (2011-03-30 19:44:07 UTC) #1
Sergey Ulanov
I'm concerned about clearing the buffer when we start new sound. Maybe it's better to ...
9 years, 8 months ago (2011-03-31 22:04:46 UTC) #2
scherkus (not reviewing)
nit but will defer to sergeyu for final review http://codereview.chromium.org/6776024/diff/1/media/audio/linux/alsa_output.cc File media/audio/linux/alsa_output.cc (right): http://codereview.chromium.org/6776024/diff/1/media/audio/linux/alsa_output.cc#newcode590 media/audio/linux/alsa_output.cc:590: ...
9 years, 8 months ago (2011-03-31 22:08:10 UTC) #3
scherkus (not reviewing)
and updates here?
9 years, 8 months ago (2011-04-05 17:39:11 UTC) #4
davejcool
These changes certainly helped the Linux desktop case, but did not help for Chrome-OS or ...
9 years, 8 months ago (2011-04-05 19:11:59 UTC) #5
davejcool
I needed to add a state check in StartTask(), WritePacket(), and WriteTask() so that the ...
9 years, 8 months ago (2011-04-09 03:10:42 UTC) #6
scherkus (not reviewing)
tentative LGTM w/ one question http://codereview.chromium.org/6776024/diff/10001/media/audio/linux/alsa_output.cc File media/audio/linux/alsa_output.cc (right): http://codereview.chromium.org/6776024/diff/10001/media/audio/linux/alsa_output.cc#newcode404 media/audio/linux/alsa_output.cc:404: buffer_->Clear(); final question: are ...
9 years, 8 months ago (2011-04-11 18:22:39 UTC) #7
davejcool
I answered Andrew's question here about clearing buffer_ when starting. http://codereview.chromium.org/6776024/diff/10001/media/audio/linux/alsa_output.cc File media/audio/linux/alsa_output.cc (right): http://codereview.chromium.org/6776024/diff/10001/media/audio/linux/alsa_output.cc#newcode404 ...
9 years, 8 months ago (2011-04-13 01:24:05 UTC) #8
scherkus (not reviewing)
9 years, 8 months ago (2011-04-13 16:03:23 UTC) #9
thanks for clarifying -- makes sense

let's check it in!

Powered by Google App Engine
This is Rietveld 408576698