سؤال

Consider the following code:

http://jsfiddle.net/LVFa6/

The ScriptProcessorNode EventHandler process is not called. Consider adding processor.connect(audio.destination); at the end, as shown in the following code:

http://jsfiddle.net/LVFa6/1/

The EventHandler process is now called as expected.

The Web Audio API specification states that

audioprocess events are only dispatched if the ScriptProcessorNode has at least one input or one output connected.

Why must the ScriptProcessorNode be connected to the audio destination for its EventHandler to be called?

هل كانت مفيدة؟

المحلول

It's a known bug in Blink (Chrome). If you remove the "webkit" prefix (and you should!), this code works in Firefox.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top