fix: serve SpessaSynth processor locally to avoid CDN version mismatch
- Download spessasynth_processor.min.js from CDN, serve as static file - Change __SpessaSynthCDN to /static/js/services/ - Fix version mismatch between esm.sh library and CDN processor
This commit is contained in:
@@ -107,9 +107,12 @@
|
||||
const bufCopy = buffer.slice(0);
|
||||
await _synthInstance.soundBankManager.addSoundBank(bufCopy, sfId);
|
||||
await _synthInstance.isReady;
|
||||
// Force program 0 on channel 0 to activate loaded bank
|
||||
this.controllerChange(0, 0, 0);
|
||||
this.programChange(0, 0);
|
||||
// Force bank+program select on all channels to activate loaded bank
|
||||
for (let ch = 0; ch < 16; ch++) {
|
||||
try { _synthInstance.controllerChange(ch, 0, 0); } catch (e) {}
|
||||
try { _synthInstance.controllerChange(ch, 32, 0); } catch (e) {}
|
||||
try { _synthInstance.programChange(ch, 0); } catch (e) {}
|
||||
}
|
||||
_currentSfId = sfId;
|
||||
console.log("[SonicSF] SoundFont loaded:", sfId);
|
||||
} catch (e) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user