DescriptionFix problem when we did not play beginning of HTML5 audio stream in low latency mode.
Problem manifested itself on Mac because Mac code is especially sensitive to timing, and because Mac code ignores length of data in buffer -- it assumes buffer is always full, and gives to OS the entire buffer (zeroed out in that case).
Fix consists of 2 parts:
* When starting audio stream, send request for the data -- previously code depended on data length in the buffer being 0, so it assumed no data would be played, and data would be returned starting from 2nd request.
* Implement polling "is data ready?" when starting new stream. Start physical stream only after first chunk data is available (or after ~9ms had passed, to correctly handle "old" clients not writing metadata into buffer). Polling is not continuous, it is done by task delayed by 3ms.
Fix is definitely not necessary on Windows, where we have mechanism that handles "bad" timing when requesting new data, but I decided it is better to implement it on all platforms.
Added test.
BUG=98674
TEST=Go to http://www.jimmysparkle.me/dump/chrome-bug/ and listen to the audio stream.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=105311
Patch Set 1 #
Total comments: 8
Patch Set 2 : '' #
Messages
Total messages: 8 (0 generated)
|