Bug 218729 - [GPUProcess] Regression(r268632) Garbage is rendered on speakers when using WebAudio
Summary: [GPUProcess] Regression(r268632) Garbage is rendered on speakers when using W...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Audio (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks: 217715
  Show dependency treegraph
 
Reported: 2020-11-09 16:16 PST by Chris Dumez
Modified: 2020-11-10 10:53 PST (History)
10 users (show)

See Also:


Attachments
Patch (10.37 KB, patch)
2020-11-09 16:43 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (10.41 KB, patch)
2020-11-10 08:26 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2020-11-09 16:16:55 PST
garbage is rendered on speakers when using WebAudio and when enabling the GPU Process.

Easily testable with this demo:
https://webaudiodemos.appspot.com/MIDIDrums/index.html

This is a regression from using a CARingBuffer.
Comment 1 Chris Dumez 2020-11-09 16:43:23 PST
Created attachment 413644 [details]
Patch
Comment 2 Peng Liu 2020-11-09 19:40:41 PST
Comment on attachment 413644 [details]
Patch

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

> Source/WebKit/ChangeLog:14
> +        remain to processed (usually 0). As a result, RemoteAudioDestinationProxy::renderOnRenderingThead()

Good catch! I misunderstood the comment of PushPullFIFO::pull(). The return value of this function is the number of samples *left* in the FIFO, not the number of samples fetched from the FIFO.

> Source/WebKit/WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp:140
>          completionHandler(0, 0);

Not a problem of this patch. But we have to early return here after calling completionHandler().
Comment 3 Chris Dumez 2020-11-10 08:26:52 PST
Created attachment 413697 [details]
Patch
Comment 4 EWS 2020-11-10 10:52:08 PST
Committed r269630: <https://trac.webkit.org/changeset/269630>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 413697 [details].
Comment 5 Radar WebKit Bug Importer 2020-11-10 10:53:16 PST
<rdar://problem/71245599>