diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-15 16:41:08 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-15 16:41:08 +0100 |
| commit | 3a3eca975f15d1e025d6c46c6de253d2abaa7170 (patch) | |
| tree | 766b9684a4075681c571b06caae1262f30910381 /src/audio/tracker.cc | |
| parent | 6e7aa374b6e0e5ebda2f3525c130ce0cc1cd72cb (diff) | |
fix(audio): WAV dump drift improvements, acceptable state
WAV dump changes:
- Bypass ring buffer, render directly with synth_render()
- Frame accumulator eliminates truncation errors
- Skip pre-fill and fix seek for WAV dump mode
- Result: No glitches, -150ms drift at 64b (acceptable)
Timeline editor:
- Fix waveform tooltip position calculation
- Increase beat bar visibility (0.5 opacity)
Cleanup:
- Remove all drift debugging code from audio.cc and tracker.cc
Status: Acceptable for now, further investigation needed.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'src/audio/tracker.cc')
| -rw-r--r-- | src/audio/tracker.cc | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/audio/tracker.cc b/src/audio/tracker.cc index 00c31e9..37f0683 100644 --- a/src/audio/tracker.cc +++ b/src/audio/tracker.cc @@ -324,14 +324,6 @@ void tracker_update(float music_time_sec, float dt_music_sec) { } } - // DEBUG: Track kick/snare timing for drift investigation - if (event.sample_id == 0 || event.sample_id == 1) { // Assuming kick=0, snare=1 - const char* name = (event.sample_id == 0) ? "KICK " : "SNARE"; - const float delta_ms = (event_music_time - music_time_sec) * 1000.0f; - printf("[DRIFT] %s: music=%.4f expect=%.4f delta=%.2fms offset=%d\n", - name, music_time_sec, event_music_time, delta_ms, sample_offset); - } - trigger_note_event(event, sample_offset, volume_mult); active.next_event_idx++; } |
