fix: connect SpessaSynth output to audioCtx.destination
Per md/38_FLOWCLIENT.md Phase 1: SpessaSynth output was not connected to speakers. Add synth.connect(audioContext.destination) after construction to route synthesized audio to user speakers.
This commit is contained in:
@@ -70,6 +70,7 @@
|
||||
const procUrl = window.__SpessaSynthCDN + "spessasynth_processor.min.js";
|
||||
await audioContext.audioWorklet.addModule(procUrl);
|
||||
_synthInstance = new window.SpessaSynthClass(audioContext);
|
||||
_synthInstance.connect(audioContext.destination);
|
||||
await _synthInstance.isReady;
|
||||
_initialized = true;
|
||||
console.log("[SonicSF] SpessaSynth engine ready.");
|
||||
@@ -78,6 +79,7 @@
|
||||
try {
|
||||
const mod = await import("https://cdn.jsdelivr.net/npm/spessasynth_lib@4.3.1/dist/index.js");
|
||||
_synthInstance = new mod.WorkerSynthesizer(audioContext);
|
||||
_synthInstance.connect(audioContext.destination);
|
||||
await _synthInstance.isReady;
|
||||
_initialized = true;
|
||||
console.log("[SonicSF] WorkerSynthesizer ready.");
|
||||
|
||||
Reference in New Issue
Block a user