| Age | Commit message (Collapse) | Author |
|
Updated AUDIO_LIFECYCLE_REFACTOR.md to support lazy loading instead of
eager "load all at init" approach.
Key changes:
- Lazy loading with 1-2s pre-warming lookahead (recommended)
- On-demand decompression for compressed assets (future)
- Cache eviction policy for long demos (optional)
- Async background loading (post-MVP enhancement)
Benefits over eager loading:
- Instant startup (no upfront loading delay)
- Memory efficient (only load active + upcoming samples)
- No trigger stutter (pre-warming prevents load-on-access)
- Spreads load cost over time
Example timeline:
t=0.0s: Load 0 samples (instant)
t=0.0s: Pre-warm 3-5 samples for next 2s
t=1.0s: Pre-warm 2-3 more samples
By t=10s: Only ~10 samples loaded (not all 19)
Addresses concern about "load all samples at init" being too costly.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
Updated AUDIO_LIFECYCLE_REFACTOR.md to explicitly address asset/procedural
spectrogram handling and AssetManager relationship.
Key additions:
- SpectrogramResourceManager component separates resource loading from sequencing
- Clear ownership rules: AssetManager owns assets, ResourceManager owns procedurals
- Unified interface for both asset and procedural spectrograms
- Reduces Tracker responsibility to pattern sequencing only
- FAQ section answering common questions about dependencies and caching
Architecture change:
AudioEngine → { Synth, Tracker, ResourceManager }
ResourceManager → { AssetManager, ProceduralGenerator }
This addresses the concern about coupling between tracker, synth, and assets.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
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 <noreply@anthropic.com>
|