summaryrefslogtreecommitdiff
path: root/src/host/overlay.zig
Commit message (Collapse)AuthorAge
* host: a sketch may ask for the sound device's pull, audio_pullGabriel Schneider2 days
| | | | | | | | | | | | | | | | | | | | | | Sound a sketch makes leaves for the device about one pull after draw, and SDL opens 1024-sample pulls at 48 kHz (21 ms); 256 leaves in about 6.5 ms, but the audio server then runs every client at that size, and drops out under load. The only way to ask was SDL_AUDIO_DEVICE_SAMPLE_FRAMES in the environment. Now an app declares `pub const audio_pull = 256;` beside its name; abi.Info carries it (0, SDL's own, when it is not declared), and the host sets it as SDL's hint just before it opens the device, at normal priority, so the environment variable still wins. It is read once, at start; the web host has no device to open and ignores it. The sound overlay's header says what the device took: OUTPUT ch1 / ... / pull 256. Test: audio, on SDL's dummy driver: the device opened with nothing asked takes 1024 at once, asked 256 takes 256, and with 512 in SDL's copy of the environment takes 512 though 256 was asked. test-audio: 48/48 steps, 9/9 tests. README: the app table's row, and a paragraph in sound with the trade-off. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
* Add display-paced frame timing and presentation feedback in ZigGabriel Schneider3 days
|
* sketchbook: a drawing layer on top, host fixes for replay and migrationGabriel Schneider7 days
|
* Put the game first: lib/sketchbook, sketches/vecanimGabriel Schneider2026-09-25
The root is the game. The platform library moves to lib/sketchbook (with serve_web.py, which serves any sketch's web build, as a tool of it), and vecanim to sketches/vecanim, still its own package on the same library.