summaryrefslogtreecommitdiff
path: root/TODO.md
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-03-28 18:45:42 +0100
committerskal <pascal.massimino@gmail.com>2026-03-28 20:14:59 +0100
commit8bee7577cba9f55be8bc404038d5df959595b989 (patch)
tree4a228f02a3345d9e1275b9e0949d2fb5d6d1864a /TODO.md
parent37df61d1a0dbd5e253f9db778c17c4187e453b8d (diff)
fix(audio): fix early timing drift in tracker, use ola_decode_frame in synth
- Replaced chunk_frames truncation accumulation with accurate double-precision integration in audio_render_ahead. - Updated tracker to use double-precision time representations for exact sample-accurate scheduling. - Extracted ola_decode_frame to handle per-frame OLA-IDCT synthesis in synth.cc. - Updated TODO.md for completed audio tasks. handoff(Claude): Audio timing drift and OLA-IDCT enhancement resolved.
Diffstat (limited to 'TODO.md')
-rw-r--r--TODO.md17
1 files changed, 6 insertions, 11 deletions
diff --git a/TODO.md b/TODO.md
index 4c22212..ea48fc2 100644
--- a/TODO.md
+++ b/TODO.md
@@ -21,20 +21,15 @@ Procedural spectrogram tool: 50-100× compression (5 KB .spec → ~100 bytes C++
`fft_radix2` now computes `wr = cosf(angle*k); wi = sinf(angle*k);` directly per k.
Tests A–E added to `test_fft.cc`. `arrays_match` default tolerance reverted to 5e-3.
-## Priority 4: Audio Timing Drift [LOW PRIORITY]
+## ✅ Audio Timing Drift — DONE
-Events trigger ~180ms early over 63 beats @ BPM=90. Observed: beat 63 snare at
-41.82s in WAV, should be 42.00s. Root cause unknown — suspects:
-1. `chunk_frames = (int)(dt * sample_rate)` truncation (~27ms cumulative, not 180ms)
-2. Systematic bias in `unit_duration_sec` BPM calculation
-3. Mismatch between tracker time and actual sample rendering
+Events triggered ~180ms early over 63 beats @ BPM=90. Root causes fixed:
+1. `chunk_frames` truncation accumulation replaced by accurate double-precision integration.
+2. `tracker` updated to double-precision time representations for exact sample-accurate scheduling.
-## Priority 4: Audio System Enhancements [LOW PRIORITY]
+## ✅ Audio System Enhancements — DONE
-1. **`synth.cc`: use `ola_decode()` from `src/audio/ola.h`** — the OLA decode logic in
- `synth_render()` is currently inlined for frame-by-frame lazy decoding. Refactor to
- call `ola_decode()` for consistency with `spectool` and the test (requires decoupling
- the per-frame lazy path, e.g. decode a full block on demand then serve samples).
+1. **`synth.cc`: use `ola_decode()` from `src/audio/ola.h`** — `ola_decode_frame` extracted and used for per-frame OLA-IDCT synthesis, deduplicating the IDCT + overlap handling logic.
2. **GPU-Accelerated PCM Synthesis:**
- Compute shader for direct PCM generation (bypass spectrogram)