diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-04 13:10:57 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-04 13:10:57 +0100 |
| commit | bb49daa17cfbb244a239b620372eaf27ed252b0f (patch) | |
| tree | d6272414920748a7b5744c896a8bc79b3f1a32aa /TODO.md | |
| parent | c4888bea71326f7a69e8214af0d9c2a62a60b887 (diff) | |
feat(audio): Implement mock audio backend for testing (Task #51.2)
Created MockAudioBackend for deterministic audio event recording and
timing verification. Enables robust tracker synchronization testing.
Changes:
- Created VoiceTriggerEvent structure (timestamp, spec_id, volume, pan)
- Implemented MockAudioBackend with event recording capabilities
- Added time tracking: manual (advance_time) and automatic (on_frames_rendered)
- Created test_mock_backend.cc with 6 comprehensive test scenarios
- Verified synth integration and audio_render_silent compatibility
- Added to CMake test builds
All test infrastructure guarded by #if !defined(STRIP_ALL). Zero size
impact on production build. All 14 tests pass.
handoff(Claude): Task #51.2 complete, mock backend ready for tracker tests
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'TODO.md')
| -rw-r--r-- | TODO.md | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -3,6 +3,15 @@ This file tracks prioritized tasks with detailed attack plans. ## Recently Completed (February 4, 2026) +- [x] **Task #51.2: Mock Audio Backend**: + - [x] **Event Recording**: Created `VoiceTriggerEvent` structure to capture timestamp, spectrogram_id, volume, and pan. + - [x] **MockAudioBackend Class**: Implemented test-only backend with event recording and time tracking capabilities. + - [x] **Time Management**: Added `advance_time()`, `set_time()`, and `get_current_time()` for deterministic testing. + - [x] **Frame Rendering Hook**: Implemented `on_frames_rendered()` to automatically update time based on audio frames (32kHz). + - [x] **Synth Integration**: Verified mock backend correctly captures voice triggers from synth engine. + - [x] **Comprehensive Tests**: Created `test_mock_backend.cc` with 6 test scenarios covering all mock functionality. + - [x] **Build Integration**: Added mock backend to test builds, all 14 tests pass. + - [x] **Task #51.1: Audio Backend Abstraction**: - [x] **Interface Created**: Defined `AudioBackend` interface in `src/audio/audio_backend.h` with hooks for voice triggering and frame rendering. - [x] **Production Backend**: Moved miniaudio implementation to `MiniaudioBackend` class, maintaining backward compatibility. @@ -73,7 +82,7 @@ This file tracks prioritized tasks with detailed attack plans. - [ ] **Task #51: Tracker Timing Verification** - [x] **Task #51.1: Audio Backend Abstraction**: Create an interface to separate audio output from synth logic, enabling testable backends. - - [ ] **Task #51.2: Mock Audio Backend**: Implement a test backend that records voice trigger events with precise timestamps. + - [x] **Task #51.2: Mock Audio Backend**: Implement a test backend that records voice trigger events with precise timestamps. - [ ] **Task #51.3: Tracker Test Suite**: Create `test_tracker.cc` to verify pattern triggering, timing accuracy, and synchronization. - [ ] **Task #51.4: Integration with Build**: Wire up tests to CMake and ensure they run in CI. |
