fix: không có âm thanh khi play MIDI item - quay lại ScriptProcessor làm renderer mặc định (worklet gây lỗi thiết bị), giữ worklet mono-safe + cache-busting
This commit is contained in:
@@ -86,12 +86,14 @@
|
||||
|
||||
console.log("[SonicSF] AudioCtx state:", _audioCtx.state, "sampleRate:", _audioCtx.sampleRate);
|
||||
|
||||
// Prefer the AudioWorklet (fluidsynth-bridge) — ScriptProcessor
|
||||
// is deprecated and logs a console warning. Fall back to
|
||||
// ScriptProcessor only if the worklet cannot be created.
|
||||
var _useScriptNode = false;
|
||||
// ScriptProcessor is the proven-stable renderer in this app.
|
||||
// The AudioWorklet path (fluidsynth-bridge) is implemented and
|
||||
// mono-safe, but it caused device-specific audio failures, so
|
||||
// keep it opt-in (flip to false to try it) — the deprecation
|
||||
// console warning is cosmetic.
|
||||
var _useScriptNode = true;
|
||||
try {
|
||||
await _audioCtx.audioWorklet.addModule('/static/js/worklets/fluidsynth-bridge.js');
|
||||
await _audioCtx.audioWorklet.addModule('/static/js/worklets/fluidsynth-bridge.js?v=202608031240');
|
||||
console.log("[SonicSF] Worklet registered OK");
|
||||
} catch (e) {
|
||||
console.warn("[SonicSF] Worklet reg failed:", e);
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<script src="/static/js/services/audioEngine.js?v=202607271016"></script>
|
||||
<script src="/static/js/services/storage.js?v=202607271016"></script>
|
||||
<script src="/static/js/services/soundfontStorage.js?v=202607271016"></script>
|
||||
<script src="/static/js/services/soundfontPlayer.js?v=202608031230"></script>
|
||||
<script src="/static/js/services/soundfontPlayer.js?v=202608031245"></script>
|
||||
<script src="/static/js/services/aiGateway.js?v=202607271016"></script>
|
||||
<script src="/static/js/services/dawCommandDispatcher.js?v=202607271016"></script>
|
||||
<script src="/static/js/services/pianoRollTabService.js?v=202607272044"></script>
|
||||
|
||||
Reference in New Issue
Block a user