diff options
author | davej@chromium.org <davej@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-14 23:34:00 +0000 |
---|---|---|
committer | davej@chromium.org <davej@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-14 23:34:00 +0000 |
commit | 4841a4bde07696cad73224a0c7e28ea9343c9e1c (patch) | |
tree | 5750fda34ee1ed66d1a17b5e78bed0cf0630ba22 /media/audio/simple_sources.cc | |
parent | fb930c854c9d3d984411eb6be45242af793943b3 (diff) | |
download | chromium_src-4841a4bde07696cad73224a0c7e28ea9343c9e1c.zip chromium_src-4841a4bde07696cad73224a0c7e28ea9343c9e1c.tar.gz chromium_src-4841a4bde07696cad73224a0c7e28ea9343c9e1c.tar.bz2 |
Fix erratic HTML5 audio playback
This was affecting all platforms. The major issue was that he SetPlaybackRate(1) which is used to start playback was being done in the middle of the series of Seek operations. So doing Seek() followed by SetPlaybackRate(1) was done, the Seek could immediately stop the playback. To fix, Seek() was made atomic with regards to SetPlaybackRate() by delaying the execution of SetPlaybackRate until after the Seek sequence has completely finished.
To make things run even smoother, a short delay was added before recyclilng a used audio stream in the Dispatcher. This gives the stream time to 'power down' before being reused.
Tested on Linux, Chrome-OS (Cr48) and Mac with great results, making HTML5 audio much more usable for games.
BUG=73045,59369,59370,65618
TEST=Manual, Quickly playing/stopping HTML5 audio should play cleanly.
Review URL: http://codereview.chromium.org/6822019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81670 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/audio/simple_sources.cc')
0 files changed, 0 insertions, 0 deletions