Enables authentic General MIDI music playback in `2006Scape-Web` over both HTTP and HTTPS by implementing the missing `Class56_Sub1_Sub1` web adapter and wiring `js-synthesizer` (`libfluidsynth-2.3.0.js`) with the `TimGM6mb.sf2` SoundFont.
### Java MIDI Pipeline Bridge
- `Class56_Sub1_Sub1.java`:
- Added `org.scape2006.web` implementation of `Class56` forwarding `method827`, `method828`, `method830`, `method831`, `method832`, and `method833` to `DesktopHooks.playMidiBytes`, `setSignlinkVolume`, and `stopSignlinkMidi`.
- `build.gradle`:
- Patched `Game.constructMusic()` in `syncSharedSources` to instantiate `new Class56_Sub1_Sub1()` directly instead of `Class.forName("Class56_Sub1_Sub1").newInstance()`, preventing `musicIsntNull()` from returning `false`.
### FluidSynth Web Audio & Caching
- `src/main/webapp/libfluidsynth-2.3.0.js`, `js-synthesizer.min.js`, `TimGM6mb.sf2`:
- Bundled FluidSynth WASM/JS synthesizer and General MIDI SoundFont (`5.8M`) locally for offline and plain-HTTP LAN compatibility.
- `src/main/webapp/index.html`:
- Wired `window.scapeWebAudio` (`ensureFluidSynth`, `playMidi`, `setMidiVolume`, `stopMidi`) to load `TimGM6mb.sf2`, loop tracks via `setPlayerLoop(-1)`, and resume pending MIDI on first user gesture.
- `src/main/webapp/sw.js`:
- Added `libfluidsynth-2.3.0.js`, `js-synthesizer.min.js`, and `TimGM6mb.sf2` to `SHELL_ASSETS` and bumped `CACHE_VERSION` to `2006scape-web-v5`.
5.7 MiB
5.7 MiB