HTML5 Audio Buffer getting stuck

怎甘沉沦 提交于 2019-12-04 13:38:25

I had the same problem but finally got the solution! The problem is the javascript node cicle. I suggest you to change the createJavaScriptNode() first:

var levelChecker = context.createScriptProcessor(4096, 1 ,1);

The garbage collector has a problem with "levelChecker" variable and his onaudioprocess , so you have to bind the scriptprocessor or the onaudioProcess callback to the window. Here the HOLY SOLUTION:

 levelChecker.onaudioprocess = window.audioProcess = function(e) { ...

Just add window.audioProcess in that line and you will never deal with tat problem anymore.

Here you can find further info : http://lists.w3.org/Archives/Public/public-audio/2013JanMar/0304.html

Hope that works for you!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!