V42+V42A: fix seam click khi loop master FX — worklet wrap crossfade (tail->head) + native WebAudio loop cho bypass (het click beat 0); dip bypass 5ms; PDC playhead freeze/snap
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
console.warn('[BridgeAudioNode] AudioWorklet unavailable — ScriptProcessor fallback');
|
||||
return false;
|
||||
}
|
||||
var url = '/static/js/services/bridgeAudioWorklet.js?v=202608152200';
|
||||
var url = '/static/js/services/bridgeAudioWorklet.js?v=202608272301';
|
||||
_ctx.audioWorklet.addModule(url).then(function () {
|
||||
if (!_initialized) return; // disconnect() happened while loading
|
||||
if (_useWorklet) return; // already set up (init retry)
|
||||
@@ -49,12 +49,15 @@
|
||||
_workletNode.port.postMessage({ type: 'audio', l: b.l, r: b.r });
|
||||
}
|
||||
console.log('[BridgeAudioNode] AudioWorklet active');
|
||||
try { if (window.__dbgLog) window.__dbgLog('worklet', 'active pre=' + _preBuffer.length); } catch (e) {}
|
||||
} catch (err) {
|
||||
console.warn('[BridgeAudioNode] AudioWorkletNode failed — ScriptProcessor fallback', err);
|
||||
_useWorklet = false;
|
||||
try { if (window.__dbgLog) window.__dbgLog('worklet', 'NODE_FAIL'); } catch (e) {}
|
||||
}
|
||||
}).catch(function (err) {
|
||||
console.warn('[BridgeAudioNode] addModule failed — ScriptProcessor fallback', err);
|
||||
try { if (window.__dbgLog) window.__dbgLog('worklet', 'MODULE_FAIL'); } catch (e) {}
|
||||
});
|
||||
return true; // pending — worklet may become active later
|
||||
}
|
||||
@@ -157,6 +160,16 @@
|
||||
_dest = dest;
|
||||
},
|
||||
disconnect: disconnect,
|
||||
isReady: function () { return _initialized; }
|
||||
isReady: function () { return _initialized; },
|
||||
getDiag: function () {
|
||||
return {
|
||||
initialized: _initialized,
|
||||
useWorklet: _useWorklet,
|
||||
hasWorkletNode: !!_workletNode,
|
||||
preBufferLen: _preBuffer.length,
|
||||
chunksLen: _chunks.length,
|
||||
gain: _gainNode ? _gainNode.gain.value : -1
|
||||
};
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user