Closed
Bug 916384
Opened 11 years ago
Closed 11 years ago
ScriptProcessorNode should not call onaudioprocess when no other nodes are connected
Categories
(Core :: Web Audio, defect, P1)
Tracking
()
RESOLVED
FIXED
mozilla29
People
(Reporter: karlt, Assigned: padenot)
References
Details
(Keywords: perf)
Attachments
(2 files, 1 obsolete file)
279 bytes,
text/html
|
Details | |
7.44 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#ScriptProcessorNode "audioprocess events are only dispatched if the ScriptProcessorNode has at least one input or one output connected."
Assignee | ||
Updated•11 years ago
|
Whiteboard: [webaudio-perf]
Reporter | ||
Updated•11 years ago
|
Priority: -- → P1
Updated•11 years ago
|
Assignee: nobody → paul
Assignee | ||
Comment 2•11 years ago
|
||
I had to adjust the test that checks that event fires without input XOR output.
Attachment #8344726 -
Flags: review?(roc)
Comment on attachment 8344726 [details] [diff] [review] Stop calling onaudioprocess on the ScriptProcessorNode it has no inputs or outputs. r= Review of attachment 8344726 [details] [diff] [review]: ----------------------------------------------------------------- ::: content/media/webaudio/ScriptProcessorNode.cpp @@ +228,5 @@ > + // onaudioprocess event. > + if (!(aStream->ConsumerCount() || > + aStream->AsProcessedStream()->InputPortCount())) { > + return; > + } We need to produce something in aOutput. I think we actually should consume any output buffers that script has already produced. Otherwise if we reconnect after some time, we'll play very old data. So I think here we should clear our input and output buffers and set aOutput to null data before we return.
Attachment #8344726 -
Flags: review?(roc) → review-
Assignee | ||
Comment 4•11 years ago
|
||
This should address the comments.
Attachment #8345397 -
Flags: review?(roc)
Assignee | ||
Updated•11 years ago
|
Attachment #8344726 -
Attachment is obsolete: true
Attachment #8345397 -
Flags: review?(roc) → review+
Assignee | ||
Comment 5•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/012b1baf2b19
Assignee | ||
Comment 6•11 years ago
|
||
Backed out for crashes. https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=63ae0ef30e3f
Assignee | ||
Comment 7•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/55e604639526
https://hg.mozilla.org/mozilla-central/rev/55e604639526
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in
before you can comment on or make changes to this bug.
Description
•