[Webkit-unassigned] [Bug 89017] New: JavaScriptAudioNode does not fire onaudioprocess with 0 input channels

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 13 10:26:40 PDT 2012


           Summary: JavaScriptAudioNode does not fire onaudioprocess with
                    0 input channels
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Web Audio
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: crogers at google.com
                CC: crogers at google.com

JavaScriptAudioNode (part of the Web Audio API) does not fire the onaudioprocess event as it should if it is configured to have 0 input channels.  Changing it to 1 or 2 makes it work.

Steps to Reproduce:
Here is a simple sine wave demo:
var context = new webkitAudioContext();
var node = context.createJavaScriptNode(1024, 0, 1);
var freq = context.sampleRate / (440 * 2 * Math.PI);
var x = 0;

node.onaudioprocess = function(e) {
   var data = e.outputBuffer.getChannelData(0);
   for (var i = 0; i < data.length; ++i) {
       data[i] = Math.sin(x++ / freq);
<button onclick="node.connect(context.destination)">Play</button>
<button onclick="node.disconnect()">Pause</button>

1 - Clicking play makes no sound and in fact onaudioprocess is never fired.
2 - Change the JavaScriptAudioNode to take 1 input channel, eg. context.createJavaScriptNode(1024, 1, 1);
3 - Notice that it works now.

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