fix: ReferenceError assignTrackMidiChannel - chuyển allocator channel lên module-level cho PianoRollTabEditor + bật AudioWorklet thay ScriptProcessor
This commit is contained in:
@@ -86,14 +86,16 @@
|
||||
|
||||
console.log("[SonicSF] AudioCtx state:", _audioCtx.state, "sampleRate:", _audioCtx.sampleRate);
|
||||
|
||||
var _useScriptNode = true;
|
||||
// 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;
|
||||
try {
|
||||
await _audioCtx.audioWorklet.addModule('/static/js/worklets/fluidsynth-bridge.js');
|
||||
console.log("[SonicSF] Worklet registered OK");
|
||||
} catch (e) {
|
||||
console.warn("[SonicSF] Worklet reg failed:", e);
|
||||
}
|
||||
console.log("[SonicSF] Using ScriptProcessorNode (forced for debug)");
|
||||
|
||||
console.log("[SonicSF] Initializing FluidSynth WASM Engine...");
|
||||
var TOTAL_MEMORY = 256 * 1024 * 1024;
|
||||
|
||||
Reference in New Issue
Block a user