mirror of
https://github.com/Creased/RCM-Emulator.git
synced 2026-12-06 02:48:11 +01:00
The FIFO_FULL flag read never-full, so a PIO sample loop drained a whole melody in a few hundred milliseconds of emulated time. Silicon paces that loop with back-pressure, and a payload that checks it played at the right rate - hwtest's melody test now measures its own duration against fs - saw a port that was not clocking. Frames pushed drain at the frame rate audio_rate_hz() derives from I2S_TIMING, on the emulated clock, and the flag sets while more than the FIFO's depth is still waiting. A take's drain clock restarts after a pause longer than its backlog, so the codec I2C traffic between phrases is not counted against the port. The FIFO state resets with the take and on a soft reset. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EZMuJ4deiS5WBkvnEMEdQD