fix(fxrt): bo pace setTimeout input, gui ngay theo dong ho audio worklet (het crackle sau 3-4s khi chain rong)
This commit is contained in:
@@ -318,7 +318,7 @@ const fxRtSendFrames=d=>{if(!fxRt.ws||fxRt.ws.readyState!==1)return;try{const f=
|
||||
// chong race: neu stop/restart xay ra trong luc cho, bo qua.
|
||||
if(fxRt.fadedIn)return;setTimeout(()=>{if(token!==fxRt.startToken)return;fxRt.fadedIn=true;fxRtCrossfade(true,token);// Dry gan silent (tc 0.025) roi moi tre pdcDelay — tranh gap khi delay
|
||||
// dang lon dan.
|
||||
setTimeout(()=>fxRtApplyPdc(),250);},30);return;}if(d.type==='set_param'){try{fxRt.ws.send(JSON.stringify({cmd:'set_param',slot:d.slot,key:d.key,value:d.value}));}catch(e){}return;}if(d.type==='stats'){fxRt.stats=d;console.debug('[FX RT stats]',d);return;}if(d.type!=='in')return;fxRt.inQueue.push(d);fxRtInPump();};// Pace input: tối đa 1 block/kỳ (~5.8ms). Gửi dồn theo burst (main thread bị
|
||||
setTimeout(()=>fxRtApplyPdc(),250);},30);return;}if(d.type==='set_param'){try{fxRt.ws.send(JSON.stringify({cmd:'set_param',slot:d.slot,key:d.key,value:d.value}));}catch(e){}return;}if(d.type==='stats'){fxRt.stats=d;console.debug('[FX RT stats]',d);return;}if(d.type!=='in')return;fxRtSendFrames(d);};// Pace input: tối đa 1 block/kỳ (~5.8ms). Gửi dồn theo burst (main thread bị
|
||||
// rAF renderFrame block khi mở MASTERING PANEL) → SHM ring 4-slot tràn → mất
|
||||
// block → ngắt quãng.
|
||||
// Phase 4.2: fader SAU worklet — worklet chèn giữa outputAnalyser (chain
|
||||
|
||||
Reference in New Issue
Block a user