diff options
| author | skal <pascal.massimino@gmail.com> | 2026-01-28 11:01:08 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-01-28 11:01:08 +0100 |
| commit | 4abb9c9ee84cf0391e95847e61b70251e5429573 (patch) | |
| tree | 0cd621b18d920fb6204985ec2190c308a25d1c89 /PROJECT_CONTEXT.md | |
| parent | 1677a7032977a4c8b7aba8a3152f6a035f58da5f (diff) | |
docs: Synchronize project state for Asset System milestone
Updates documentation and context to reflect the completed Asset Management System, production build pipeline, and visual improvements.
- Updated PROJECT_CONTEXT.md with detailed architectural and build system decisions.
- Added milestone summary to SESSION_NOTES.md.
- Expanded GEMINI.md context file list.
Diffstat (limited to 'PROJECT_CONTEXT.md')
| -rw-r--r-- | PROJECT_CONTEXT.md | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/PROJECT_CONTEXT.md b/PROJECT_CONTEXT.md index acc0b43..7664d9c 100644 --- a/PROJECT_CONTEXT.md +++ b/PROJECT_CONTEXT.md @@ -41,12 +41,19 @@ Incoming tasks in no particular order: ## Session Decisions and Current State ### Asset Management System: -- **Architecture**: Implemented a C++ tool (`asset_packer`) that bundles external files into the binary. -- **Descriptors**: Assets are defined in `assets/final/assets.txt` with optional compression settings. -- **Runtime Access**: Provides a type-safe `AssetId` enum and `GetAsset` function for retrieving raw byte data at runtime. -- **Integration**: Fully integrated into the CMake build process with automatic header/source generation. +- **Architecture**: Implemented a C++ tool (`asset_packer`) that bundles external files into hex-encoded C arrays. +- **Lookup**: Uses a highly efficient array-based lookup (AssetRecord) for O(1) retrieval of raw byte data at runtime. +- **Descriptors**: Assets are defined in `assets/final/demo_assets.txt` (for the demo) and `assets/final/test_assets_list.txt` (for tests). +- **Organization**: Common retrieval logic is decoupled and located in `src/util/asset_manager.cc`, ensuring generated data files only contain raw binary blobs. - **Lazy Decompression**: Scaffolding implemented for future on-demand decompression support. +### Build System: +- **Production Pipeline**: Automated the entire assembly process via a `final` CMake target (`make final`). +- **Automation**: This target builds the tools, runs the `gen_assets.sh` script to re-analyze audio and regenerate sources, and then performs final binary stripping and crunching (using `strip` and `gzexe` on macOS). +- **Scripts**: + - `scripts/gen_assets.sh`: Re-analyzes source audio files into `.spec` format and triggers the `asset_packer`. + - `scripts/crunch_demo.sh`: Performs the final size optimization and compression. + ### Audio Engine (Synth): - **Architecture**: Real-time additive synthesis from spectrograms using Inverse Discrete Cosine Transform (IDCT). - **Dynamic Updates**: Implemented a double-buffering (flip-flop) mechanism for thread-safe, real-time updates of spectrogram data. The main thread writes to a back buffer, which is then atomically swapped to become the active front buffer for the audio thread, avoiding real-time allocations and locks. |
