[Webkit-unassigned] [Bug 78043] New: Make it possible to create JavaScriptAudioNode-based Web Audio nodes
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Feb 7 14:45:08 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=78043
Summary: Make it possible to create JavaScriptAudioNode-based
Web Audio nodes
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: Web Audio
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: smus at google.com
CC: crogers at google.com
I'm trying to create a custom node based on the JavaScriptAudioNode by extending its prototype with a custom function, and then plugging it into the audio graph. Unfortunately, doing this causes a "SyntaxError: Invalid destination node" error, and the audio graph rejects the custom node.
Here's what I'm doing:
1. I extend the context with a createCustomNode call, as follows:
// Augment the context with a createMeterNode call that returns an augmented
// JavaScriptAudioNode.
function registerCustomWebAudioNode(context, constructorName, classObject) {
// Get the webkitAudioContext and extend its prototype.
webkitAudioContext.prototype[constructorName] = function() {
var customNode = new classObject(this);
customNode.prototype = context.createJavaScriptNode(2048, 1, 1);
return customNode;
}
}
function MeterNode(context) {
console.log('init');
}
MeterNode.prototype.onClip = function(callback) {
// ...
};
2. Then, I'm using the custom node as follows:
// Assuming context, source are initialized earlier.
meter = context.createMeterNode();
// Connect source to meter node to destination.
source.connect(meter);
meter.connect(context.destination);
3. I get an error: SyntaxError: Invalid destination node
This sounds like something at the JavaScript - C++ bindings layer.
--
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