Bug 168644 - Pulling more frames from AudioSampleDataSource than the last push added will always fail.
Summary: Pulling more frames from AudioSampleDataSource than the last push added will ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-21 00:12 PST by Jer Noble
Modified: 2017-03-14 12:57 PDT (History)
0 users

See Also:


Attachments
Patch (4.03 KB, patch)
2017-02-21 00:16 PST, Jer Noble
eric.carlson: review+
Details | Formatted Diff | Diff
Patch for landing (4.02 KB, patch)
2017-03-14 10:27 PDT, Jer Noble
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2017-02-21 00:12:07 PST
Pulling more frames from AudioSampleDataSource than the last push added will always fail.
Comment 1 Jer Noble 2017-02-21 00:16:23 PST
Created attachment 302239 [details]
Patch
Comment 2 Eric Carlson 2017-03-14 10:15:32 PDT
Comment on attachment 302239 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=302239&action=review

> Source/WebCore/ChangeLog:10
> +        Rather than use the delta between the ring buffer's end time and the last pushed timestamp (or what is effectively the number of samples in the last push operation) to determine if there is enough buffered data to satisfy a pull operation, use the ring buffer's actual buffered duration.
> +
> +        Then, instead of saving the last pushed timestamp, explicitly save the last push count, and use that data to inform how much to offset the output timestamps (or what is effectively how much to allow the source to pre-buffer).

Nit: these lines should be wrapped.
Comment 3 Jer Noble 2017-03-14 10:27:02 PDT
Created attachment 304392 [details]
Patch for landing
Comment 4 Jer Noble 2017-03-14 12:57:20 PDT
Committed r213931: <http://trac.webkit.org/changeset/213931>