From 137727c4e12a4ad2350d1ce22d45e03fec6e510a Mon Sep 17 00:00:00 2001 From: skal Date: Thu, 5 Feb 2026 18:44:31 +0100 Subject: docs: Add Audio Lifecycle Refactor plan (Task #56) Created comprehensive design document for refactoring the tracker-synth relationship to eliminate initialization order dependencies. Proposed solution: AudioEngine class that manages both synth and tracker as private members, providing order-independent initialization and clear ownership semantics. Three options analyzed: - Option A: Unified AudioEngine (recommended) - Option B: Registration Handle System - Option C: Reference-Counted Resources Estimated effort: 2-3 weeks with incremental migration path. Binary size impact: ~500 bytes (acceptable). See doc/AUDIO_LIFECYCLE_REFACTOR.md for complete design rationale, implementation plan, and decision matrix. Co-Authored-By: Claude Sonnet 4.5 --- TODO.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'TODO.md') diff --git a/TODO.md b/TODO.md index 3322304..fbe4060 100644 --- a/TODO.md +++ b/TODO.md @@ -113,6 +113,18 @@ This file tracks prioritized tasks with detailed attack plans. - [x] **Enhanced Procedural Noise:** Implemented a multi-octave Value Noise generator for higher-quality skybox textures. - [x] **Scene Integrity:** Restored proper object indexing and removed redundant geometry, ensuring the floor grid and objects render correctly. +## Priority 1.5: Audio System Architecture (Task #56) +**Goal:** Refactor tracker-synth relationship to eliminate fragile initialization order dependency. + +- [ ] **Task #56: Audio Lifecycle Refactor** + - **Problem:** Current system requires synth_init() before tracker_init() or spectrograms get cleared + - **Impact:** Fragile, hard to test, prevents composition, causes subtle bugs + - **Proposed Solution:** Unified AudioEngine class that manages synth and tracker as members + - **See:** `doc/AUDIO_LIFECYCLE_REFACTOR.md` for detailed design options and implementation plan + - **Effort:** 2-3 weeks (incremental migration path available) + - **Size Impact:** ~500 bytes (acceptable for robustness gain) + - **Priority:** Medium (current workaround functional but fragile) + ## Priority 2: 3D System Enhancements (Task #18) **Goal:** Establish a pipeline for importing complex 3D scenes to replace hardcoded geometry. - [ ] **Task #18.0: Basic OBJ Asset Pipeline** (New) -- cgit v1.2.3