summaryrefslogtreecommitdiff
path: root/PROJECT_CONTEXT.md
diff options
context:
space:
mode:
Diffstat (limited to 'PROJECT_CONTEXT.md')
-rw-r--r--PROJECT_CONTEXT.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/PROJECT_CONTEXT.md b/PROJECT_CONTEXT.md
index 0bddb50..e607a19 100644
--- a/PROJECT_CONTEXT.md
+++ b/PROJECT_CONTEXT.md
@@ -22,3 +22,23 @@ Constraints:
Style:
- Demoscene
- No engine abstractions
+
+## Session Decisions and Current State
+
+### 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.
+- **Sample Generation**: Samples are generated in the frequency domain (spectrograms) and converted to time-domain audio using IDCT with a Hamming window.
+- **Audio Input Support (`spectool`)**: Supports WAV and MP3 input for analysis (leveraging `miniaudio`'s built-in decoders). AAC is explicitly *not* supported due to complexity and dependency constraints.
+
+### Tools Developed:
+- `spectool`: A command-line tool for analyzing WAV/MP3 files into `.spec` spectrogram format and for playing back `.spec` files through the synth engine.
+- `specview`: A command-line tool for visualizing `.spec` spectrogram files in ASCII art.
+
+### Coding Style:
+- **Standard**: Adopted a consistent coding style enforced by `.clang-format`.
+- **Rules**: 2-space indentation, no tabs, 80-column line limit.
+- **File Extension**: All C++ source files renamed from `.cpp` to `.cc`.
+
+### Development Workflow:
+- **Commit Policy**: Explicit rule to always run the full test suite before preparing any commit, documented in `CONTRIBUTING.md`.