fix: WorkerSynthesizer fallback, remove non-existent BasicSynthesizer
This commit is contained in:
@@ -65,16 +65,15 @@
|
|||||||
console.log("[SonicSF] SpessaSynth initialized via AudioWorklet.");
|
console.log("[SonicSF] SpessaSynth initialized via AudioWorklet.");
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
_initInProgress = false;
|
_initInProgress = false;
|
||||||
console.warn("[SonicSF] SpessaSynth AudioWorklet init failed:", e, "- trying WorkerSynthesizer...");
|
console.warn("[SonicSF] AudioWorklet failed, trying WorkerSynthesizer:", e);
|
||||||
try {
|
try {
|
||||||
const mod = await import("https://esm.sh/spessasynth_lib@4.3.1");
|
const mod = await import("https://esm.sh/spessasynth_lib@4.3.1");
|
||||||
const WorkerSynthesizer = mod.WorkerSynthesizer;
|
_synthInstance = new mod.WorkerSynthesizer(audioContext);
|
||||||
_synthInstance = new WorkerSynthesizer(audioContext);
|
|
||||||
await _synthInstance.isReady;
|
await _synthInstance.isReady;
|
||||||
_initialized = true;
|
_initialized = true;
|
||||||
console.log("[SonicSF] SpessaSynth initialized via Worker.");
|
console.log("[SonicSF] SpessaSynth initialized via Worker.");
|
||||||
} catch (e2) {
|
} catch (e2) {
|
||||||
console.error("[SonicSF] SpessaSynth init failed completely:", e2);
|
console.error("[SonicSF] All SpessaSynth paths failed:", e2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user