MCPcopy Index your code
hub / github.com/modelscope/FunASR / createNode

Function createNode

runtime/html5/static/recorder-core.js:267–284  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

265 };
266 };
267 var createNode=function(){
268 if(!awNext())return;
269 var node=stream._n=new AwNode(ctx, RecProc, {
270 processorOptions:{bufferSize:bufferSize}
271 });
272 mediaConn(node);
273 node.port.onmessage=function(e){
274 if(badInt){
275 clearTimeout(badInt);badInt="";
276 };
277 if(awNext()){
278 onReceive(e.data.val);
279 }else if(!isWorklet){
280 CLog(audioWorklet+"多余回调",3);
281 };
282 };
283 CLog("Connect采用"+audioWorklet+",设置"+RecTxt+"."+ConnectEnableWorklet+"=false可恢复老式"+scriptProcessor+webMTips+oldIsBest,3);
284 };
285
286 //如果start时的resume和下面的构造node同时进行,将会导致部分浏览器崩溃,源码assets中 ztest_chrome_bug_AudioWorkletNode.html 可测试。所以,将所有代码套到resume里面(不管catch),避免出现这个问题
287 ctx.resume()[calls&&"finally"](function(){//注释掉这行 观摩浏览器崩溃 STATUS_ACCESS_VIOLATION

Callers 1

connWorkletFunction · 0.70

Calls 4

awNextFunction · 0.70
mediaConnFunction · 0.70
onReceiveFunction · 0.70
CLogFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…