diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-17 01:01:34 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-17 12:15:01 -0300 |
| commit | 8e8110e357b22bbbc2d1e566f24d2e33e6ecb0fe (patch) | |
| tree | 06d89aadd338b67adaa9de7c9bc05d7bfb09a25d /examples/spheres/test/play.script | |
| parent | 562b503d5007e3afe1de426fc1175eadfbbb45c4 (diff) | |
| download | sketchbook-8e8110e357b22bbbc2d1e566f24d2e33e6ecb0fe.tar.gz sketchbook-8e8110e357b22bbbc2d1e566f24d2e33e6ecb0fe.zip | |
spheres: its sound streamed from the GPU's block, at the host's lead
The synth block goes to the speakers with f.audioBuffer, made to keep
in.lead queued; in_flight, discard and lead_seconds are gone, and a
chord's jump is the stream's clear alone (nothing is on its way back to
drop). The block is still read back, a frame later, for the scope.
The sound is the same: with the block fixed at 800 samples a frame, the
play script and a script that plays every chord key (seven jumps) push
the same samples before and after, to the bit (849600 and 1164007 of
them), the new one a frame sooner. A change leaves for the device in
19 to 27 ms on average (three one-minute runs on a loaded machine)
instead of 96 (dummy driver, 60 Hz, SDL's 1024-sample pulls). The
empty Store declaration the brief mentioned is not in this sketch
(main.zig says "No Store"); nothing was touched there.
Tests: zig build test, 75/75 steps, 3/3 tests (its play script now also
expects the stream fed).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'examples/spheres/test/play.script')
| -rw-r--r-- | examples/spheres/test/play.script | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/spheres/test/play.script b/examples/spheres/test/play.script index 1b06372..8dbe978 100644 --- a/examples/spheres/test/play.script +++ b/examples/spheres/test/play.script @@ -1,6 +1,8 @@ # Plays each preset and synthesis mode headless; screenshots land in # .zig-cache/spheres/ for review. frames 120 +# The GPU's blocks reach the speakers' stream. +expect-audio 1 expect running true expect preset figure_eight screenshot .zig-cache/spheres/figure-eight.png |
