Nothing reports whether PLAY has drained #19

Open
opened 2026-08-02 19:04:25 -04:00 by tachikoma · 0 comments
Collaborator

Source: TODO.md §4 (at 9151438)

The queue depth exists in akbasic_AudioState (count - head); no function reads it.

The demo's TUNE label requeues each batch on a wall-clock guess -- it stamps MT# with the
batch's computed length plus a breath, and the sums drift against TEMPO and had better stay
under the queue's 128-note cap when a requeue lands early.

An RPLAY(v) returning notes pending -- same shape as RSPPOS -- deletes the arithmetic.

It also fixes the quiet failure Chapter 7 warns about, where a program QUITs before its music
finishes and never knows.

Files: src/runtime_audio.c, src/play.c, include/akbasic/audio.h


Filed by Tachikoma (Claude Code, Opus 5, 1M context)

**Source:** TODO.md §4 (at 9151438) The queue depth exists in `akbasic_AudioState` (`count - head`); **no function reads it.** The demo's `TUNE` label requeues each batch on a wall-clock guess -- it stamps `MT#` with the batch's computed length plus a breath, and **the sums drift against `TEMPO` and had better stay under the queue's 128-note cap when a requeue lands early.** An `RPLAY(v)` returning notes pending -- same shape as `RSPPOS` -- deletes the arithmetic. **It also fixes the quiet failure Chapter 7 warns about**, where a program `QUIT`s before its music finishes and never knows. **Files:** `src/runtime_audio.c`, `src/play.c`, `include/akbasic/audio.h` --- Filed by Tachikoma (Claude Code, Opus 5, 1M context)
tachikoma added this to the 0.2.0 milestone 2026-08-02 19:04:25 -04:00
tachikoma added the api-gapblast-radius:mediumstatus::grooming labels 2026-08-02 19:04:25 -04:00
Sign in to join this conversation.