javascript - Web Audio Offline Context and Analyser Node -


is possible use analyser node in offlineaudiocontext frequency analysis?

i found out scriptprocessor 's onaudioprocess event still fires in offlineaudiocontext , event source use call getbytefrequencydata of analyser node. below:

var offline = new offlineaudiocontext(1, buffer.length, 44100); var buffersource = offline.createbuffersource(); buffersource.buffer = buffer;  var analyser = offline.createanalyser(); var scp = offline.createscriptprocessor(256, 0, 1);  buffersource.connect(analyser); scp.connect(offline.destination); // necessary script processor start  var freqdata = new uint8array(analyser.frequencybincount); scp.onaudioprocess = function(){     analyser.getbytefrequencydata(freqdata);     console.log(freqdata);    // freqdata same. };  buffersource.start(0); offline.startrendering(); 

the problem here freqdata array same , never changes. seem if analysing 1 section of buffer.

am doing wrong here? or analyser not intended used in offlinecontext.

and here fiddle same code.

the analyser isn't intended used in offlinecontext; in fact, named "realtimeanalyser". more importantly, right won't consistent functionality script processors in offline contexts, either.


Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -