[Webkit-unassigned] [Bug 113274] New: ScriptProcessorNode should block when being rendered in OfflineAudioContexts

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 25 21:50:03 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=113274

           Summary: ScriptProcessorNode should block when being rendered
                    in OfflineAudioContexts
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Web Audio
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: russell.mcclellan at gmail.com
                CC: crogers at google.com


The purpose of OfflineAudioContext is nominally to be able to "mix down" web audio sessions into a single audio buffer.  However, the current behavior with ScriptProcessorNodes isn't useful:

steps to reproduce: 
1) create OfflineAudioContext
2) create sine wave generator ScriptProcessorNode, attach to destination
3) attach an oncomplete and start rendering the offline audio context

wanted result:
The ScriptProcessorNode is called several times, creating a clean sine wave in the final buffer.

actual result:
the offline audio context renders at full speed on the audio thread, not blocking for the Script Processing on the main thread.  If the main thread isn't done by the time audio is needed, that buffer is dropped.  If you're lucky, a few buffers of sine wave here or there will get mixed down.

While the current behavior doesn't directly violate the spec, it does seem like it's neither useful nor intended.  I mentioned this to the public web audio list here:
http://lists.w3.org/Archives/Public/public-audio/2013JanMar/0396.html
But it seems there wasn't agreement that the current behavior was allowed by the current spec.

I have a patch for this (I simply added a condition variable to ScriptProcessorNode that is waited on during offline rendering) but it depends on https://bugs.webkit.org/show_bug.cgi?id=113121

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list