Web audio API Why is my audio processing callback not getting play time?

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.

+3
source share
2

webkit, .

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

W3C WebAudio Spec AudioProcessingEvent , :

interface AudioProcessingEvent : Event {

        JavaScriptAudioNode node;
        readonly attribute float playbackTime;
        readonly attribute AudioBuffer inputBuffer;
        readonly attribute AudioBuffer outputBuffer; 

    }

W3C Spec: http://www.w3.org/TR/2012/WD-webaudio-20120802/

"playbackTime" WebKit-137862. , , AudioProcessingEvent.

AudioProcessingEvent.idl:

[
    Conditional=WEB_AUDIO,
    JSGenerateToJSObject
] interface AudioProcessingEvent : Event {
    readonly attribute AudioBuffer inputBuffer;
    readonly attribute AudioBuffer outputBuffer; 
};
+3

, Webkit (, Safari) - Blink (Chrome) https://code.google.com/p/chromium/issues/detail?id=332782.

, " Chromium -" - , , .:)

+2

All Articles