summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorfbarchard@chromium.org <fbarchard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-22 06:32:46 +0000
committerfbarchard@chromium.org <fbarchard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-22 06:32:46 +0000
commit4b506f22cc17e4511209bae191481c6f4172d834 (patch)
treefa4aec24123552f5330d5811c460a0c6fd11120d /media
parent8910e310da144950b320f152a73856935b5e0175 (diff)
downloadchromium_src-4b506f22cc17e4511209bae191481c6f4172d834.zip
chromium_src-4b506f22cc17e4511209bae191481c6f4172d834.tar.gz
chromium_src-4b506f22cc17e4511209bae191481c6f4172d834.tar.bz2
Quick fix for Alsa stutter - Wake up sooner.
BUG=23974 TEST=http://fbarchard-kir.ad.corp.google.com/testmatrix/red/red2.ogv Review URL: http://codereview.chromium.org/316005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29761 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r--media/audio/linux/alsa_output.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/media/audio/linux/alsa_output.cc b/media/audio/linux/alsa_output.cc
index 53dc14b..51da10d 100644
--- a/media/audio/linux/alsa_output.cc
+++ b/media/audio/linux/alsa_output.cc
@@ -630,6 +630,9 @@ void AlsaPcmOutputStream::ScheduleNextWrite(Packet* current_packet) {
next_fill_time_ms = std::max(next_fill_time_ms, kNoDataSleepMilliseconds);
}
+ // Wake up sooner than should be necessary to avoid stutter.
+ next_fill_time_ms /= 2; // TODO(fbarchard): Remove this hack.
+
// Only schedule more reads/writes if we are still in the playing state.
if (shared_data_.state() == kIsPlaying) {
if (next_fill_time_ms <= 0) {