diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-08 11:13:53 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-08 11:13:53 +0100 |
| commit | 392d03c0c05f24be3210a04d9a50cd9714d1e265 (patch) | |
| tree | 3c4985879bdf614536020f2061c299ecf442677f /TODO.md | |
| parent | d2d20763ac61f59187d261bb7d6dedcab525bc54 (diff) | |
refactor(audio): Finalize audio sync, update docs, and clean up test artifacts
- Implemented sample-accurate audio-visual synchronization by using the hardware audio clock as the master time source.
- Ensured tracker updates and visual rendering are slaved to the stable audio clock.
- Corrected to accept and use delta time for sample-accurate event scheduling.
- Updated all relevant tests (, , , , ) to use the new delta time parameter.
- Added function.
- Marked Task #71 as completed in .
- Updated to reflect the audio system's current status.
- Created a handoff document: .
- Removed temporary peak log files (, ).
Diffstat (limited to 'TODO.md')
| -rw-r--r-- | TODO.md | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -4,20 +4,22 @@ This file tracks prioritized tasks with detailed attack plans. **Note:** For a history of recently completed tasks, see `COMPLETED.md`. -## Priority 1: Audio Pipeline Simplification & Jitter Fix (Task #71) [NEW] +## Priority 1: Audio Pipeline Simplification & Jitter Fix (Task #71) [COMPLETED] **Goal**: Address audio jittering in the miniaudio backend and simplify the entire audio pipeline (Synth, Tracker, AudioEngine, AudioBackend) for better maintainability and performance. +**Summary**: Achieved sample-accurate audio-visual synchronization by making the audio playback time the master clock for visuals and tracker updates. Eliminated jitter by using a stable audio clock for scheduling. See HANDOFF_2026-02-07_Final.md for details. + ### Phase 1: Jitter Analysis & Fix -- [ ] **Investigate**: Deep dive into `miniaudio_backend.cc` to find the root cause of audio jitter. Analyze buffer sizes, callback timing, and thread synchronization. -- [ ] **Implement Fix**: Modify buffer management, threading model, or callback logic to ensure smooth, consistent audio delivery. -- [ ] **Verify**: Create a new, specific test case in `src/tests/test_audio_backend.cc` or a new test file that reliably reproduces jitter and confirms the fix. +- [x] **Investigate**: Deep dive into `miniaudio_backend.cc` to find the root cause of audio jitter. Analyze buffer sizes, callback timing, and thread synchronization. +- [x] **Implement Fix**: Modify buffer management, threading model, or callback logic to ensure smooth, consistent audio delivery. +- [x] **Verify**: Create a new, specific test case in `src/tests/test_audio_backend.cc` or a new test file that reliably reproduces jitter and confirms the fix. ### Phase 2: Code Simplification & Refactor -- [ ] **Review Architecture**: Map out the current interactions between `Synth`, `Tracker`, `AudioEngine`, and `AudioBackend`. -- [ ] **Identify Complexity**: Pinpoint areas of redundant code, unnecessary abstractions, or confusing data flow. -- [ ] **Refactor**: Simplify the pipeline to create a clear, linear data flow from tracker events to audio output. Reduce dependencies and clarify ownership of resources. -- [ ] **Update Documentation**: Modify `doc/HOWTO.md` and `doc/CONTRIBUTING.md` to reflect the new, simpler audio architecture. +- [x] **Review Architecture**: Map out the current interactions between `Synth`, `Tracker`, `AudioEngine`, and `AudioBackend`. +- [x] **Identify Complexity**: Pinpoint areas of redundant code, unnecessary abstractions, or confusing data flow. +- [x] **Refactor**: Simplify the pipeline to create a clear, linear data flow from tracker events to audio output. Reduce dependencies and clarify ownership of resources. +- [x] **Update Documentation**: Modify `doc/HOWTO.md` and `doc/CONTRIBUTING.md` to reflect the new, simpler audio architecture. --- |
