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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 14 02:03:11 PDT 2012


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





--- Comment #1 from xingnan.wang at intel.com  2012-06-14 02:03:07 PST ---
(In reply to comment #0)
> 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:
> <script>
> 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);
>    }
> }
> </script>
> <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.

Hi Chris,

I cannot reproduce the bug (with zero input). 
I`ve tested on both the latest chromium and chrome in my ubuntu and mac, the onaudioprocess events could be caught and the sound was played well.

-- 
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