Skip to content

Stall sound held to the host's time, as a frame's is - #143

Merged
boubou666 merged 1 commit into
masterfrom
claude/stall-sound-budget
Nov 24, 2026
Merged

boubou666 merged 1 commit into
masterfrom
claude/stall-sound-budget

Conversation

@boubou666

Copy link
Copy Markdown
Contributor

In real time, a stall's sound (the watcher's, while no frame ends: a load) was the engine brought up to the EE clock, which counts disc waits the PC never had. The Third Age's first movie after the title gave about 1.3 s of extra sound in one second (bursts up to 8613 samples); the output queue reached 230 ms and dropped 1.2 s of it.

stallSound now goes through the same budget as frameSound (FreeHost::holdToHostTime, factored out of frameSound): the newest samples kept, the surplus skipped where it was made.

Checked with TTA's window build in real time on SDL's dummy audio driver (TTA_AUDIO_STATS / TTA_AUDIO_RATE), title -> new game -> first movie: 111505 -> 52236 samples in that second, queue max 230 -> 82 ms, dropped 59286 -> 0. Steady play unchanged (48000 samples per wall second). Deterministic runs (not real time) are untouched.

🤖 Generated with Claude Code

In real time a stall's sound (the watcher's, while no frame ends: a
load) was the engine brought up to the EE clock, its disc waits counted
where the PC had none: The Third Age's first movie after the title gave
about 1.3 s of extra sound in a second (bursts up to 8613 samples), and
the output queue dropped 1.2 s of it. stallSound now goes through the
same budget as frameSound (holdToHostTime): 52K samples in that second,
the queue at most 82 ms, nothing dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@boubou666
boubou666 merged commit b7298d5 into master Nov 24, 2026
4 checks passed
@boubou666
boubou666 deleted the claude/stall-sound-budget branch November 24, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant