I am trying to implement a custom web audio node API using the ScriptProcessorNode interface. I have most of the work, but for some reason, the event passed in onaudioprocessdoes not define the property playbackTime, Why is this?
var AudioContext = window.AudioContext || window.webkitAudioContext;
var context = new AudioContext();
var proc = context.createScriptProcessor(16384, 0, 2);
proc.onaudioprocess = function (event) {
if (!event.playbackTime) {
console.log("No playback time");
}
proc.disconnect(0);
};
proc.connect(context.destination);
What happens is that the proc.onaudioprocessweb audio API is called, but event.playbackTimeis undefined. See My fiddle for a demonstration of the problem ("No play time" should be printed on the console).
I have so far tested Chromium 32.0.1700.107 on Linux and Chrome 33.0.1750.117 on Windows.
source
share