mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-09 03:51:24 +00:00
* Preview: each stall doubles the frames the held sound waits for (#3260) A preview that renders just below real time stopped its sound at the first uncached frame, then started it again as soon as the silent preview kept up with `ahead` frames cached. Those ran out within a few frames, so the sound started and stopped over and over, which plays as distortion (#2473, #3260). Each stall that stops the sound now doubles the cached frames ahead it waits for before starting again, up to what fits in the RAM preview. A new preview starts counting from zero. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * Preview: cap the held sound's wait at frames the prefetch can keep cached Once the doubling reached the RAM preview's `fit`, the held sound waited for offsets 0..fit, but the prefetch only requests offsets below fit - 1, and while the silent preview moves on its last requests are still rendering. The sound then stayed silent almost to the end of the preview even after rendering recovered. The backoff now stops at half of the frames the prefetch requests, and never below the wait before any stall. A new test caches only the frames playback itself requests, with a RAM preview of `ahead + 2` frames. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>