Files
PodeCaradox--GalaxyFrame/docs
bigmak94andClaude Opus 5.5 875a6d7e4d Streamed music no longer goes silent: the DSP renders a sub-frame at a time
A player reported a game that works but has no stage music.  Every stage
theme is a stream (.ast), and all streams could stop for the rest of the
session:

- JASAramStream follows a stream's voice and sets up its loop (or its
  end) once the voice is within 400 samples of it.  A voice found beyond
  the loop end is a fatal error to it: the stream's voices are paused and
  no stream is loaded any more until the game is restarted.
- The console's DSP renders 80 samples between two updates of the voices.
  The port's rendered a whole frame of seven sub-frames on the sync
  command, so the game saw a voice move 560 samples at a time and missed
  the 400-sample window on about one pass in four.  Which pass is fixed
  for each track: the file select music stopped after 55 s (a new player
  choosing a file), Gateway Galaxy's after 64 s, Honeyhive's after 83 s,
  the title's after 2.5 minutes, Good Egg's after 10.5.  Sound effects
  and sequenced jingles went on.

The DSP now goes as the console's does: the sync command only says how
many sub-frames to render, and each is rendered when the game has updated
the voices and released the last sixteen of them (the end of
JASDSPChannel::updateAll), then reported with its mail.  Notes and
envelopes get the console's 2.5 ms timing as well, instead of 17.5 ms.

Checked on the headset, headless and in the app: a minute on the file
select screen and then a galaxy (no stage music at all before, music
now), the loops found in the recordings by correlation with the disc's
samples, 14 minutes of self-play in Good Egg Galaxy across six loops, a
cutscene skipped into its boss music, and six other stages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 18:37:45 +02:00
..