Package client.teavm
package client.teavm
TeaVM-specific integration layer for JSIDPlay2.
This package provides the glue code between the Java-side emulator logic and the JavaScript environment generated by TeaVM. It contains classes responsible for:
- Bridging between Java and JavaScript using
@JSBodyand@Importannotations. - Managing WebAssembly and JavaScript interoperability (e.g. transferring audio and video buffers to the browser runtime).
- Implementing browser-specific functionality like WebAudio sample conversion, pixel buffer handling, and asynchronous communication with the main thread or Web Workers.
The goal of this package is to isolate all browser- and TeaVM-dependent code, so that the rest of the emulator remains platform-agnostic and testable in a pure Java environment.
Structure
ImportedApi— ImplementsIImportedApiand bridges emulator events (samples, pixels, printer output, etc.) to JavaScript functions.AudioDriverTeaVM— Audio output implementation optimized for TeaVM with audio buffers.PALEmulationTeaVM— Video output implementation optimized for TeaVM with RGBA pixel buffers.client.teavm.common— Shared classes and interfaces used by both the TeaVM JavaScript and WebAssembly builds.
- Autor:
- Ken Händel
-
KlassenKlasseBeschreibungBrowser needs float array for each channel with sound samples with a value range of -1..1.SharedArrayBuffer (SAB)-based implementation of
ImportedApi.WAV file supportMain class of the TeaVM version of JSIDPlay2 to generate JavaScript and WASM code.C backendUtility main class of the TeaVM version of JSIDPlay2 to generate JavaScript code with helper functions.