diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-08 19:01:38 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-08 19:01:38 +0000 |
commit | 87e6b1b69003191a0548325d7acac019e0f3777e (patch) | |
tree | 9f65b0c00e5419f87299eeb4a12028ff70327671 /media/audio/win | |
parent | 4d220800e2b19f161868732e7e848031a96291cb (diff) | |
download | chromium_src-87e6b1b69003191a0548325d7acac019e0f3777e.zip chromium_src-87e6b1b69003191a0548325d7acac019e0f3777e.tar.gz chromium_src-87e6b1b69003191a0548325d7acac019e0f3777e.tar.bz2 |
Flush audio data after seek
There is about 400 to 600 ms of audio that needs to be flushed
after seek, this have a pretty UX effect. This is partially
fixed in this patch by reducing the amount of data down to
about at most 500 ms stored in the hardware buffer.
This patch clears data in the software buffer in the browser
process when seek happens. We could reduce the amount of
hardware buffer to further reduce the amount of lag but that
can be fixed by subsequent patch.
BUG=24150
TEST=audio still works, audio still play after seek
the playback of old data after seek is substantially
reduced.
Few changes in this patch:
1. Flush software buffer after seek in browser process
2. Get rid of prerolling, this actually has not effect at all, so getting rid of useless code
Needs to be done after this patch:
1. Further reduce the remaining data after seek and pause
2. Still hit the DCHECK in ClockImpl::Play(), this doesn't seem to be a new problem introduced in this patch
Review URL: http://codereview.chromium.org/1508021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43983 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/audio/win')
-rw-r--r-- | media/audio/win/audio_output_win_unittest.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/media/audio/win/audio_output_win_unittest.cc b/media/audio/win/audio_output_win_unittest.cc index 0bb18a2..6a06274 100644 --- a/media/audio/win/audio_output_win_unittest.cc +++ b/media/audio/win/audio_output_win_unittest.cc @@ -465,7 +465,7 @@ TEST(WinAudioTest, PushSourceFile16KHz) { // We buffer and play at the same time, buffering happens every ~10ms and the // consuming of the buffer happens every ~50ms. We do 100 buffers which // effectively wrap around the file more than once. - PushSource push_source(kSize50ms); + PushSource push_source; for (uint32 ix = 0; ix != 100; ++ix) { push_source.Write(file_reader.GetChunkAt(offset), kSize50ms); if (ix == 2) { |