feat(audio): multitrack stem recording — Stage 3 (Recording settings UI)
Adds the "Recording" category to the Settings page so the recording mode is selectable from the UI (config + core wiring already existed from Stage 2). - AppMessage::RecordingModeSelected → persists config + sends SetRecordingMode (takes effect on the next recording start). recording_mode_hint copy. - iced 0.14 pick_list can't host per-option tooltips, so the three modes are RADIO BUTTONS each wrapped in a `tooltip` (hover explains that mode) — chosen over a dropdown so each option is self-documenting. Placed after Microphone, using the shared section_header; output-dir note below. - +1 config test (recording_mode round-trip + is_multitrack classification). User-verified live (Both mode writes the expected WAVs; radios + tooltips approved). Senior-written — Gemini's unsanctioned Stage 3 attempt was discarded. 179 tests (169 lib +1 ign, 6 reconnect, 4 transport), clippy --all-targets clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Multitrack (stem) recording — plan / scope contract
|
||||
|
||||
**Status:** Stages 1 + 2 DONE (2026-06-13). Stage 3 (config UI) next, then Stage 4 (field-test). This doc is the scope contract; update it as stages land.
|
||||
**Status:** Stages 1, 2 + 3 DONE (Stage 3 on 2026-06-14, all by the senior). Stage 4 (2-machine field-test on dopedart) is the only remaining step. This doc is the scope contract; update it as stages land.
|
||||
|
||||
## Goal & differentiation
|
||||
|
||||
@@ -29,8 +29,8 @@ Pure/testable: tests assert "after N cycles every track is exactly N×FRAME_SAMP
|
||||
### Stage 2 — Wire into the mixer + mic tasks — DONE (`f6520b7`)
|
||||
Done: mixer taps each peer's raw frame into `stems`, writes peer stems + mix (Both) + `end_cycle` per cycle; mic pushed to the recorder's FIFO from the capture thread; `add_peer` on `PeerJoined` (named) + for everyone present at recording start; `Mixed` mode keeps the single-file `Recorder`; `RecordingMode` config + `SetRecordingMode` command (sent at startup) select the path; `is_multitrack` is the fast-path gate; `stop_recording` finalizes both. Note: mic uses an internal FIFO drained per cycle (not a per-cycle `write_mic`), matching `recorder.rs`. No UI yet → defaults to `Mixed`; set `recording_mode` in config.json to exercise stems until Stage 3.
|
||||
|
||||
### Stage 3 — Config + UI
|
||||
`AppConfig.recording_mode: Mixed | Multitrack | Both` (serde-default `Mixed`, back-compat). New **"Recording"** category in Settings (fits the category-header layout) with the mode picker + an output-dir note. Output to a per-session dir `~/peerspeak-recordings/<timestamp>/` (Multitrack/Both); `Mixed` keeps today's single-file behaviour.
|
||||
### Stage 3 — Config + UI — DONE (2026-06-14, senior-written)
|
||||
`AppConfig.recording_mode` was added in Stage 2; Stage 3 added the **"Recording"** Settings category (after Microphone): `AppMessage::RecordingModeSelected` (persists + sends `SetRecordingMode`), `recording_mode_hint`, and the picker. **Note:** iced 0.14 `pick_list` can't host per-option tooltips, so the modes are rendered as **radio buttons each wrapped in a `tooltip`** (hover shows the per-mode explanation) — user-chosen over a dropdown. Output dir note included. Output to a per-session dir `~/peerspeak-recordings/<timestamp>/` (Multitrack/Both); `Mixed` keeps the single-file behaviour. +1 config test (`test_recording_mode_field`). User-verified live (2 WAVs created as expected in Both mode; radios + tooltips approved). (Gemini's unsanctioned Stage 3 attempt was discarded; this is the senior's implementation.)
|
||||
|
||||
### Stage 4 — Field-test (dopedart)
|
||||
Solo first (mic + silence stems, inspect WAVs), then 2-machine desktop↔dopedart: each voice isolated on its own track, tracks sample-aligned + in sync, late-joiner leading-silence correct, peer-leave handled.
|
||||
|
||||
Reference in New Issue
Block a user