Commits
Commits on
2e2ed698a69459f7ce472eabcbc01b00a0916d3fFiltered to crates/engine/tests/audio_multi.rsClear filter2026-08-10
✨ feat(library): every audio stream is a row, and the picked one plays and exportsAhmet Kaan Gümüş · ecb5e06
✨ feat(library): every audio stream is a row, and the picked one plays and exports A file with one audio track per language is one row per track now, not one row per file. The engine carries the pick end to end: a source is a (file, audio stream) pair, .edith v3 writes the stream on the source line, playback opens it and — the trap this closes — the export copies *that* stream's packets rather than always stream 0. Streams that cannot go on the timeline are listed greyed with the reason instead of hidden: a codec we cannot read, or a rate/layout that cannot share one output device and one copied AAC track with the rest of the timeline (there is no resampler here and no AAC encoder to write a join with). place_stream_at is the one door a row goes through, and it refuses those in the engine's own words. - v2 and v1 files still load: no stream field means stream 0, which is all those dialects could play; saving either writes v3. - Waveform peaks are keyed by file *and* stream, so two tracks of one file cannot draw each other's envelope. - Library swatches and clip tints follow the *file*, so a file's streams share one colour in the panel and on the lanes. - assets/test_multilang.mp4: two AAC 44.1k stereo streams (und, fra), the shape real multi-language media has and the one where a second stream is placeable.
✨ feat(engine): video+audio lanes with offset-placed clips, gaps, .edith v2Ahmet Kaan Gümüş · 59eb78e
✨ feat(engine): video+audio lanes with offset-placed clips, gaps, .edith v2 Project gains two lanes; a Clip now carries `start` (its timeline placement) and `link` (group id), so a gap is simply the absence of a placement rather than an object anyone has to keep in sync. Moves and trims become arithmetic on start/in_frame; the lane invariant (sorted, non-overlapping) is checked in from_parts, at the .edith parser, and asserted after every mutation. split cuts every lane and hands the two sides fresh group ids; regroup is its exact inverse. delete still ripples both lanes (the app keeps its behaviour), lift removes one placement and leaves a hole, place is the per-lane overwrite that can make one. A video gap plays as black frames from a worker that opens no file -- same channel, backpressure, cancel and retire path as a decoder -- and exports as encoded black. An audio gap is synthesised zero chunks, real ones, so the master clock keeps counting through it; on the export side it is spent as stts duration on the packet beside it, since there is no AAC encoder to make silence with. .edith v2 writes one line per placement per lane; v1 files still load, as fully-grouped gapless lanes, and save as v2.
2026-08-09
✨ feat(engine): multi-source model + segmented multi-file audioAhmet Kaan Gümüş · 5593a9f
✨ feat(engine): multi-source model + segmented multi-file audio Wave 1 of the import slice: the timeline model and the audio backend both learn about several source files. Nothing user-visible yet — every clip is still source 0 until playback/export traversal lands. S1 — project.rs model + mechanical call-site fixes: - Clip gains `source: usize` (Clip stays Copy, so clipboard/undo semantics are untouched); Project gains an append-only `sources: Vec<PathBuf>`. - Import splits in two: `import(path) -> usize` is dedup-only and pushes no history, `append_clip(source_idx, frame_count) -> bool` pushes the one snapshot — an import stays exactly one undo step, and append_clip refuses an unknown index. - Dedup key is fs::canonicalize with a raw-path fallback, so Project stays pure data and an unreadable path still gets an index. - cut/paste carry the source through `..self.clips[idx]` struct-update. - `segments_from` now yields (source, start, end) triples; playback.rs and export.rs strip the index and keep feeding the single-source audio fns. S2 — audio.rs Track/probe/bit-exact joins: - New private `Track` resolves one source once (reader, copied stts, own priming, params, sample_count). - `open_multi_segments` / `copy_multi_segments` take the source triples; `open_segments` / `copy_segments` are now one-source wrappers, so every existing call site compiles unchanged. - Each source contributes its own priming and length; the timeline sample counter and the bresenham rounding debt both run continuously across a source join, and the extra priming packet stays the first segment's alone. - `AudioSession::probe(path) -> Option<AudioProbe>` exposes the fields import validation needs. - Cross-source decode is bit-exact against single-file open_at on both sides of a join (max abs diff 0e0).