forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on fbc29d12fa2e194b105dd2344342fc50da4e90cdFiltered to crates/engine/src/playback.rsClear filter

2026-09-24

probe(demux): sample aspect ratio off the container, coded dims beside the display pairAhmet Kaan Gümüş · 66a1c40
probe(demux): sample aspect ratio off the container, coded dims beside the display pair

ffmpeg's model: the decoder keeps coded pixels and carries the SAR as
metadata. VideoMeta carries the pair now: coded_width/coded_height are
what the samples are stored at, pixel_aspect is the ratio one coded
pixel is drawn at (PixelAspect, square when nothing is stated), and
width/height stay the displayed shape their docs always promised --
stretched by the aspect, then swapped by the turn, in that order.

mkv: DisplayWidth/DisplayHeight/DisplayUnit read off the Video element
(units 3 DAR and 4 SAR; absent, or units 0/1/2, square -- measured
against ffmpeg 8.1.2, which writes a 16/9 DAR pair with unit 3 for a
setsar=4/3 source and nothing at all for a square one).
mp4: pasp (hSpacing/vSpacing) out of the visual sample entry, behind
the same fixed 78-byte header colr and hvcC sit behind, absent = square
-- measured: ffmpeg writes pasp 4/3 for setsar=4/3 and 1/1 otherwise.

VhMeta's twin fields ride along so the plugin ABI can carry the same
answer once a display size differs from the coded one.
🐛 fix(player,project): merge the app lane into mainAhmet Kaan Gümüş · 4d39c18
🐛 fix(player,project): merge the app lane into main

The settings and the subtitle palette ride in the history entry, a failed
waveform decode is asked again, and a visualizer byte past a byte is
refused rather than truncated. Lane: lane-bughunt-app.
🐛 fix(engine): the counter claims hold under a parallel runnerAhmet Kaan Gümüş · 60c5322
🐛 fix(engine): the counter claims hold under a parallel runner

W1: `a_summary_pass_folds_the_file_once` -- and the parent revision's
`an_envelope_over_the_ceiling_is_not_held` -- asserted on process-wide counter
deltas, so under `cargo test`'s parallel default a sibling test's pass landed
inside the delta. Reproduced here before the fix: `cargo test -p engine --lib --
waveform::` (default threads) -> 2 failed of 18, both counter tests, both green
serially. Two mechanisms, one per kind of interference:

- `MEMO_DECODES` is keyed by the ask now (`memo_decodes(path, stream, bps)`): it
  is the one counter another *module* moves (the playback seat test opens a
  visualizer seat on a short fixture, which is a whole-envelope ask), and a keyed
  count makes a test's claim about *its* source -- which is always a private copy
  of a fixture, so the key is the test's alone.
- the module's tests take `counters_serial()`, because `VIZ_DECODES` and
  `VIZ_FOLDED` are still process-wide and a test that *decodes* moves what a
  reading test measures. The lock is documented with its upgrade path (keying
  those two as well) and with why it is module-wide rather than reader-only.

Evidence: three parallel `cargo test -p engine --lib -- waveform:: playback::`
runs and one serial run -> 33 passed, 0 failed, every time. FAIL-BEFORE (default
runner, before this commit): 2 failed -- `a_summary_pass_folds_the_file_once`
(`folded 1440000 frames of a 960000-frame file, 1.50x over`) and
`an_envelope_over_the_ceiling_is_not_held`.

W2: the seat test's doc now says what the parent revision actually did -- a
1920x1 canvas died in the *painter* (`decode.rs`'s zero line clamped with
`max = -1`, `min > max`) and a 321x181 one died in the conversion on the
*canvas's* chroma plane (`len is 14400 but the index is 14400`, a full plane and
not an empty one) -- and says plainly that the test is a guard, not a
reproduction: a frame still arrives on the parent, which is why the masking is
the fix.

W3: the whole-envelope painter test's comment no longer claims the painter
hard-codes `VIZ_BUCKETS_PER_SEC`; a view carries its own rate and the painter
indexes by it.

Class sweep: the other process-global counter in this crate is
`ao.rs:22 DEVICES_OPENED`, asserted absolutely by `ao.rs:362`
(`AoSession::devices_opened() == 0`) -- the same class, one file this lane does
not own, so it is named rather than fixed. The `NTH` counters in `demux.rs:3385`
and `scratch.rs:38` only generate names and are not read as claims.
🐛 fix(engine): a window starts at the bucket the decode was asked forAhmet Kaan Gümüş · e5f0b93
🐛 fix(engine): a window starts at the bucket the decode was asked for

RW1, and it is the real one: `viz_window` opens the file at the bucket it is
handed, `fold_window` indexes the slice from there, so `peaks[0]` *is* absolute
bucket `first`. `view_at` labelled it `first - seek` and served the margin --
so every `view.at(abs)` of a windowed frame read the envelope's bucket
`abs + 12000`: +3 s at 4000 buckets a second, the file's tail painted silence
(slice exhausted), and a preview frame at a window grid line was not the frame
export paints from the whole envelope. The fix is the label: ask from
`first.saturating_sub(seek)` and serve what comes back, which is what the margin
was always for.

Two of my own fixtures could not see it, and that is the lesson worth writing
down: a five-second clip's first window starts at bucket 0 (where the label is a
no-op) and the 40-minute FLAC was a 440 Hz sine at 8 kHz, whose 3 s shift is
1320 whole periods -- every bucket identical. The new test is *noise* in FLAC:
buckets must be *equal*, not merely close, at the file's head, its middle, both
sides of a 30 s grid line and its last window, and the frame at each has to be
the frame `visualizer_i420` paints for the same time. FAIL-BEFORE, this tree:
`t=30.5: 8002 of 8002 windowed buckets are not the envelope's, 0 out of reach`;
PASS-AFTER: 18 waveform tests green.

RW3: the summary pass folded the ask's whole-file probe and then re-decoded the
same sound in the windows it spawned -- 1.875x a file at the eight-window
ceiling, serial, on the first look edit's critical path. The first window now
stops at the joint the next was told to start at, exactly as the envelope's own
split stops it, so the windows partition the file and a pass reads it once.
FAIL-BEFORE: `folded 1440000 frames of a 960000-frame file, 1.50x over`;
PASS-AFTER: the same test asserts within 5% of 1.00x, and the peak/length
equalities against the whole envelope still hold (`viz_summary`'s stop samples
now mirror `peaks_over`'s, so it folds the same sample set).

RW5: `VizView` carries `per_sec`, the rate its envelope was drawn at, and the
painter reads it instead of hard-coding `VIZ_BUCKETS_PER_SEC` -- the invariant is
structural now (an ask at another rate is painted at that rate) rather than
accidental. `VizView::whole` is the one place the visualizer's rate is named.

RW4b: the seat now declares the canvas masked to even dimensions and floored at
two, which is what the painter returns -- an odd `resolution 1921 1081` line used
to declare a size the planes never had. Kept as an invariant, *not* claimed as a
reproduced fix: the witness (canvases 1920x1, 1921x1081, 320x1, 321x181 through
`PlaybackSession::set_resolution` + `try_frame`) passes with the mask reverted as
well, so I could not reproduce the panic on this tree and say so in the test's
own doc. RW4a is refuted: the even-dimension mask lives in the shared painting
body (`visualizer_window_i420`, decode.rs:2199-2200), which both entry points go
through; `visualizer_i420` is a one-line wrapper over it.

Also honest-doc fixes from the same review: RW2's notice doc no longer implies a
front-end shows a mid-session death (it is fetchable through
`audio_disabled_reason`, which the app reads where a notice is *built*); and a
failed window's comment now matches the code (the seat latches it, the memo does
not).
🐛 fix(player): a history step takes its settings and its pick back with itAhmet Kaan Gümüş · 7023001
🐛 fix(player): a history step takes its settings and its pick back with it

Four refuted claims from the bughunt review, each a thing an undo restored in
the session and left stale in everything that reads it.

Engine, the order a restored step runs in: `restored_step` reseeked inside
`edit` and adopted the entry's settings only afterwards, so the landing was
computed from the values the step had just undone -- a rate undo clamped the
playhead to the pre-undo rate's idea of the timeline's end and handed the
worker the last frame for a playhead at three seconds. The closure, then
`adopt_settings`, then the reseek; the same ordering reopens a proxy undo
through the switch that just went back.

Engine, the sweep's shape: `parts()` left the palette out, so the D4
round-trip's `parts` equality passed with `self.subtitles = prev.subtitles`
deleted outright. `SubtitleTrack` compares now and `parts` carries the
palette; the D4 test asserts the palette itself, which is the assertion that
cannot go vacuous.

App, the window's own copies: `^z`/`^y` refresh neither `self.fps` nor the two
proxy switches, so after a rate undo every cut, step and fade in this window
was counted at the rate just undone, the Settings rows showed a project the
session no longer had, and the stale switch was pushed at the next session
made. `history_step` re-reads all three off the session, which is a free
function over the session because this binary has no `TestAppContext` to build
a `Player` in -- `Player::undo` is the call plus the repaint.

App, the subtitle pick: a `^z` of a removal restores the palette and left the
pick where it was, so it named a different track than the one on screen -- the
desync `sub_pick_after_removal` prevents at the removal door. The pick follows
the track it names across the step (`sub_pick_after_restore`), the drawn
plate is dropped when the palette or the pick moved under it, and the two
docs claiming a subtitle removal is not an undo step say what it does now.
🐛 fix(engine): a dead audio output is re-opened instead of ending the session's soundAhmet Kaan Gümüş · b05e9ee
🐛 fix(engine): a dead audio output is re-opened instead of ending the session's sound

The feeder flags the output dead when a write returns `None` -- a PipeWire
daemon that restarted, or a sink node that was removed. Nothing ever cleared
that flag: `start_audio` skipped its whole body for it, `arm_audio` was a no-op
while `self.audio` was `Some`, and `tick` handed the clock to wall time without
a word. The stream's position is frozen, so it can never satisfy `played_out`
again either. The session was silent for the rest of its life, through every
seek and every pause/play, with nothing shown to the user about it.

`rearm_audio` opens the output again at the rate and channel count the dead
stream carried -- the device only, never the file: the feeder is `start_audio`'s
at the seek that follows -- and clears the flag and the clock anchor that belong
to the stream that died. A seek (or the play after a pause) attempts it with no
cooldown, because that is a person asking and the one moment the sound can come
back into step with the picture; `tick` attempts it once a second, because a tick
is a rendered frame and a device that is gone for good must not be opened sixty
times a second. `tick`'s dead branch now runs *before* its clock-source guard:
the death is what puts the clock on wall time, so a session that only polled
once more would never try the device again -- the attempt has to be inside the
branch that keeps running. While it is dead, the session says so through the
door a front-end already reads for a silent one (`audio_disabled_reason`), and a
re-arm that takes clears that line again. `arm_audio` treats a dead device as no
device, so an import replaces it instead of being turned away by it.

Evidence: `cargo test -p engine --lib -- --exact
playback::tests::a_dead_output_is_rearmed_and_the_sound_comes_back` -- ok.
The test stops the stream and flags it exactly as `feed` does, stamps the
cooldown as spent, and then asserts: the notice is up, died is still set and the
tap is empty after a tick (no open inside the cooldown, nothing feeding), and
after a play + seek the flag is clear, the notice is gone and the *tap* -- the
samples that reached the device -- has samples in it again.
🐛 fix(project,playback): the settings and the subtitle palette ride in the history entryAhmet Kaan Gümüş · 2d2933c
🐛 fix(project,playback): the settings and the subtitle palette ride in the history entry

The entry held the lane list alone, so a resolution, a rate, an encoder seat, a mix rate or a proxy switch could not be taken back by ctrl+z, and removing a subtitle column had to retire the whole stack rather than reindex under it. The entry carries a ProjectSettings value and the palette now; the session hands its own copy over at every door and takes the restored one up after an undo, where a rate step conforms the per-source lengths back within a frame the way the way out already did. The column removal takes a step of its own instead of clearing the stack.

2026-09-18

🐛 fix(media): audio routing, session audio re-arm, hw trailing-zero NALs, display-matrix rotationAhmet Kaan Gümüş · bc8b82e
🐛 fix(media): audio routing, session audio re-arm, hw trailing-zero NALs, display-matrix rotation

- is_audio admits .mpeg/.mpg so mp3-with-cover files import (was fed to Mp4Demuxer)
- session audio walks past trackless leading sources and re-arms when a
  sounding file joins a silent timeline (fixes add/remove/add silence)
- engine-hw pump clears trailing cabac_zero_word bytes instead of dying
  with code -2; export falls back to software decode before first frame
- tkhd display matrix read for mp4; 90/180/270 turns baked into preview
  and export pixels; other angles refused by name (UnsupportedRotation)

2026-09-17

⚡ perf(audio): the preview paints at its own size, not the project'sAhmet Kaan Gümüş · 62b680e
⚡ perf(audio): the preview paints at its own size, not the project's

The visualizer rebuilt the picture at the project resolution (1920x1080)
for a preview displayed at ~584x328, so every look edit paid 4-5x what it
needed. `PlaybackSession::set_view_size`/`view_size` now feed every composer
the playback path opens (span, dissolve-B, black) and the app pushes the
Contain-fitted display box from a probe on the picture area, with an 8 px
deadband so a resize drag does not thrash. The export keeps its own seat at
the project resolution and is untouched.

Ring, a test song, ms per painted frame, glow 2/4/8/12/16:
  18.5/35.7/64.7/93.2/117.1  ->  5.7/5.9/9.6/12.9/15.9

"Save frame as PNG" would otherwise have followed the preview down to that
size, so it now asks the seat for one frame at the project's own size and
writes the PNG when it lands (keyed to the session that asked, with a 2 s
bound), and the preview's size comes back on the next repaint.

The painter's per-frame buffers (VizScratch) are owned by the painting
thread: 27 Vecs a frame -> 8, and none on later frames.

2026-09-16

✨ feat(audio): the waveform look carries a strand colour, and a hex/rgb doorAhmet Kaan Gümüş · 1973da2
✨ feat(audio): the waveform look carries a strand colour, and a hex/rgb door

viz_paint widens to one packed u64: hue/sat/strands/glow in the low bytes
exactly as v22 wrote them, the strand's own hue and sat above, and bit 63
saying the strand colour was chosen rather than left to the +128 complement.
Dialect v23. viz_color_hex/viz_color_from_text read and write the colour a
person would type. set_viz_paint_live joins its colour/transform/speed
twins so a drag is one undo step.

2026-09-15

✨ feat(audio): stable envelope height, full hue/sat, strands and glowAhmet Kaan Gümüş · 7ebfc44
✨ feat(audio): stable envelope height, full hue/sat, strands and glow

The 2s window no longer rescales to its own peak, so a bump keeps its
height as it enters and leaves. Colour is a 64-stop hue bar plus sat
(white→full). Strands and glow go from one line to the dense ring.
Packed on Clip.viz_paint; dialect v22.

2026-09-14

✨ feat(audio): waveform styles, any soundtrack, keys search, group on the clip menuAhmet Kaan Gümüş · dfcec06
✨ feat(audio): waveform styles, any soundtrack, keys search, group on the clip menu

Visualizer is no longer wav-only: h on a video clip with sound paints
that file's soundtrack. Style bits live on the clip (outline, smooth,
fast, colour) and toggle from CLIP. `?` type-to-filters the keys list.
Group / Ungroup / Regroup are clip-menu rows, not chords-only.
✨ feat(audio): create a waveform visualizer as a video clipAhmet Kaan Gümüş · 735b90e
✨ feat(audio): create a waveform visualizer as a video clip

Select an audio clip and press h (or the clip menu). The sound's envelope
is painted as a sliding mirrored waveform onto a video lane, so preview
and export both show it. Paste still never drops a song on V1.

2026-09-12

✨ feat(engine): software VP8 decode via dlopen'd libvpx seat in the pluginAhmet Kaan Gümüş · ba33df0
✨ feat(engine): software VP8 decode via dlopen'd libvpx seat in the plugin

VP8 was refused by a stale UNSUPPORTED claim ('no VP8 decoder'); the
vendored cros-codecs VP8 decoder is VA-API-only and the test GPU
exposes no VP8 VA-API profile, so the real seat is software: libvpx.so.9
dlopen'd inside libengine_hw.so (vpx.rs), routed before any GPU device
opens, seek = destroy+re-init on the demuxer's keyframe contract,
CAP_VP8 reported as the plugin's seat. Codec::Vp8 plumbed through
demux (V_VP8 + mp4 vp08), colorspace, refusals; export UI gains a
truthful read-only VP8 row; test_vp8.{webm,mp4} fixtures + capability
row + tests/vp8.rs decode/export twins. Verified by the authoring
session: headless playloop 270 frames 0 dropped, 50/50 seeks, live
harness-driven UI playback, cross-provider review PASS (FFI layouts
against shipped libvpx DWARF, valgrind-clean).

2026-08-26

🐛 fix(engine): mono sources up-mix onto wider timelines (DEBT #46)Ahmet Kaan Gümüş · d7c614b
🐛 fix(engine): mono sources up-mix onto wider timelines (DEBT #46)

widen() (audio.rs) duplicates a mono decode buffer into every timeline
channel -- the inverse of downmix(), wired into every decode site that
feeds mix() (run_ac3, run_mkv_ac3, run_sym, the AAC loop in run()).
audio_matches_probed (playback.rs) and the export-time width check
(audio.rs:open_multi_streams_speed_at_fade) both now let a 1ch source
join a wider timeline; a wider-than-timeline source stays refused.
🐛 fix(engine): reopen the audio device past a silent first sourceAhmet Kaan Gümüş · c322a69
🐛 fix(engine): reopen the audio device past a silent first source

PlaybackSession::open_project pinned the device to the first non-image
source (audio_source_of) with no check that source actually had a
track. A silent leading source (a clip with no audio) left every later
source unheard for the whole session. Now the scaffold walks forward
past a silent candidate to the first source that really opens a
device.

Regression test in audio_files.rs proves the scan reaches a second
source's audio (verified via audio_disabled_reason, since this sandbox
has no PipeWire device to tap samples from).
🐛 fix(app,engine): pay debts — audio-only fallbacks, panic-proof proxy, .part sweepAhmet Kaan Gümüş · b05a649
🐛 fix(app,engine): pay debts — audio-only fallbacks, panic-proof proxy, .part sweep

Twelve debts paid in one batch:

- engine: NoVideoTrack fallback at every video door — open_stream,
  open_project scaffold, and import() now route a video-extension file
  whose header holds no picture to the audio-only path instead of
  refusing (argv open, saved-project reload, and library import).
- engine: proxy/export worker wrapped in catch_unwind — a decoder panic
  settles the shared slot with Err instead of stranding Making/Cancelling.
- vendor/cros-codecs: AV1 setup_shear multiplies checked — malformed warp
  params are a parse error, not a process abort (live-proven on an AV1 film:
  clean PROXY FAILED notice, slot released, app alive).
- engine: startup sweep of orphan proxy .part files.
- app: Player::has_video probe cache — lane_refuses gates drops on the
  probed kind, not the extension; Silences hidden on soundless clips;
  audio import toast names rate/channels/length; stale no-session proxy
  label cleared.
- tests: audio-only mp4 fixture + gen_fixtures.sh line, 2 engine
  NoVideoTrack tests, toast/lane/view cases (246 bin + 14 audio_files).

Harness-proven this batch (runs 20260826-2306..2315): split-at-playhead
with undo, lane-remove mouse door, fade-out drag, argv audio-only open,
AV1 proxy clean failure.
✨ feat(app): drag moves the whole selection, all-or-nothingAhmet Kaan Gümüş · 33ae7d9
✨ feat(app): drag moves the whole selection, all-or-nothing

A dragged clip that is itself one of the selection's picks now carries
every other pick along by the same frame delta, in one undo step, and
the selection survives the move with its indices remapped rather than
cleared. One pick refused blocks the whole set -- nothing moves, one
notice. A clip dragged from outside the selection is unchanged.

Project::move_clip is now Project::move_selection with a selection of
one, so the existing single-clip path is byte-identical.

2026-08-21

feat: close subtitle lane gapsAhmet Kaan Gümüş · 45b9182Browse files
fix(timeline): close gap carries a linked take across, not one lane into silenceAhmet Kaan Gümüş · 7f487c1
fix(timeline): close gap carries a linked take across, not one lane into silence

Close gap was a permanent no-op for any linked A/V take: cut_regions
refused per-lane ripples that would pull a take's picture half away
from its sound half. gap_take_scope now widens the ripple to the
take's other lane whenever the same stretch is empty there too (same
start, same length, so nothing but silence moves and sync holds), and
refuses -- in words the user can act on -- when the gap doesn't match
or the other half is solid, rather than leaving the row to click into
silence.
✨ feat(timeline): a right-click on empty bench space closes the gapAhmet Kaan Gümüş · 29d8b28
✨ feat(timeline): a right-click on empty bench space closes the gap

Right-clicking a gap on a lane (video, audio, or the head/tail/middle of
one) now opens the same clip-menu surface with a single "Close gap"
item; picking it ripples every clip after the gap left on that lane
only (Premiere-style per-lane scope, repeatable per track), through
Project::cut_regions so it is one undo press like every other ripple.

engine/src/project.rs: Project::gap_at (+ private gap()) finds the
empty stretch under a frame, None for inside-a-clip or the open end of
a lane (nothing there to ripple back)
engine/src/playback.rs: PlaybackSession::gap_at forwards it
app/src/menus.rs: ContextMenu::on (Clip|Gap) replaces the clip-only idx
field so the existing menu, its scrim, and every context_menu = None
clear site cover the gap menu for free
app/src/player/timeline_edit.rs: open_gap_menu + close_gap
app/src/ui/overlays.rs: gap branch of context_card renders "Close gap"
app/src/ui/bench_stance.rs: bed's right-click hit-tests gap_at; a click
that lands on a clip leaves that clip's own menu untouched
feat(ui): the settings page shows the HDR reference the file declaredAhmet Kaan Gümüş · e88fbc8
feat(ui): the settings page shows the HDR reference the file declared

Surfaces the MaxCLL/MaxFALL and mastering-display peak the demuxers already
parse into ContentLight but nothing in the UI ever read (grep across
crates/app/src returned zero hits outside tests). Two new read-only rows
sit beside the existing HDR tonemap picker in the settings page's PROJECT
section -- "HDR reference" (mastering peak) and "Content light" (CLL/FALL) --
using the page's own row_static idiom (no cursor/hover/click) since nothing
in engine::project::Project has a field to persist an override into.

PlaybackSession gains a content_light() accessor, populated at every open
site (fresh open, saved-project reopen) by a second header-only Demuxer::open
for the light level, matching the same double-open-for-a-header trade this
file already accepts for audio probes.

2026-08-20

🐛 fix(settings): the page stops claiming storage it never usesAhmet Kaan Gümüş · f4ba613
🐛 fix(settings): the page stops claiming storage it never uses

Driving found the EDITOR header saying 'kept in ~/.config/edith' while those
rows wrote nothing there, and Auto proxies persisting nowhere at all — it
reverted to On every relaunch. The engine round-trip was already right; the
gap was the window-level default, which now has its own config file beside
subtitle-style. Each row's hint names its real door instead of one blanket
claim.

Settings also could not open during an export — the exporting card owns the
modal slot — while the oracle and its test asserted it could. The oracle now
agrees with what the user can observe.
🐛 fix(engine): a picture edit reuses the decoder instead of reopening the fileAhmet Kaan Gümüş · 91e6316
🐛 fix(engine): a picture edit reuses the decoder instead of reopening the file

The session's first worker was seeded with the raw caller path while
the project canonicalizes every source, so Worker::reseek's textual
path check failed and every colour or transform nudge paid a full
thread + demux + VA-API reopen (~11s on a big file) instead of a seek.
open_stream canonicalizes once, and the idle teardown stretches 2s→8s
so think-time between nudges keeps the hardware session warm.
🐛 fix(engine): a paused preview blends the dissolve instead of hanging on plain AAhmet Kaan Gümüş · 7456e34
🐛 fix(engine): a paused preview blends the dissolve instead of hanging on plain A

B's decoder opened only on the tick that first landed inside the window, so a
seek or pause that landed there before B's first frame arrived showed pure A
forever -- the clock is frozen, so no later tick ever came to correct it.

B now opens eagerly at the span's own start (options (c)+(b) combined), well
before the window is reached, and try_frame bounds a wait on B's first frame
(200ms) for the rare case a seek lands in the window before that head start
pays off -- bounded so a source B cannot decode never freezes the preview.

2026-08-19

🐛 fix(engine): fades reach exported and played-back audioAhmet Kaan Gümüş · 9ec26f6
🐛 fix(engine): fades reach exported and played-back audio

Two bugs: `forces_encode` never checked a clip's own fade, so the
default Web MP4 copy path silently dropped fades from the exported
AAC track. Worse, `Fade`'s frame counts are timeline (fps) frames but
`Fade::apply` multiplies audio-rate sample blocks; unconverted, a
fade's threshold was crossed a few milliseconds into any clip, so a
fade-out muted the rest of the segment outright and a fade-in finished
before an ear (or a 100ms RMS window) could catch it. `Fade::scaled`
now re-counts a fade at the mix's own sample rate the moment the audio
session learns it, which also fixes the same bug in live preview.
✨ feat(engine): a dissolve renders in the playback preview tooAhmet Kaan Gümüş · 3e66b40
✨ feat(engine): a dissolve renders in the playback preview too

The preview used to hard-cut where an export blends -- try_frame now opens
B's own decoder (graded and placed at B's own start, mirroring export's
Dissolve) once the playhead reaches the tail's dissolve window, and blends
its BGRA picture over A's with the same dissolve_weight ramp export uses.
One choke point covers both playing and scrubbed/seeked frames, since both
drain try_frame the same way.
✨ feat(app): a dissolve key joins two video clips end to end (ctrl+d)Ahmet Kaan Gümüş · 474b80e
✨ feat(app): a dissolve key joins two video clips end to end (ctrl+d)

Mirrors the audio crossfade: PlaybackSession::set_transition_out wraps
Project::set_transition_out (Dirty::Picture), Player::dissolve_selected
picks the join the same way crossfade_selected does, and a second press
removes the dissolve it just made. Wired into the keymap, the dispatch
table, and the clip context menu.
✨ feat(engine): clips can name a dissolve into their neighbor (edith 19, storage+format)Ahmet Kaan Gümüş · 8369d8e
✨ feat(engine): clips can name a dissolve into their neighbor (edith 19, storage+format)

transition_out frames on a video clip dissolve it into the adjacent
next clip; split keeps the tail's transition clamped and zeroes the
head; v18 files load with hard cuts, v19 round-trips bit-exactly.
Blending (playback and export) lands separately.
🐛 fix(app): the export card tells the truth about a ranged exportAhmet Kaan Gümüş · 906e7de
🐛 fix(app): the export card tells the truth about a ranged export

The size estimate and the audio-codec label both ignored the marked
range (a ranged export re-encodes; the card said copy and quoted the
whole timeline's size). The RANGE duration is computed from the frame
count instead of float seconds, and the speed card's row joins it —
same truncation class. The range band gets 2px boundary ticks so it
reads over the played fill. bench.rs learns export::start's fifth
argument, closing the arity sweep over examples.
merge audio-fades engine (edith 18) and wire fade drag stateAhmet Kaan Gümüş · 55dd056
merge audio-fades engine (edith 18) and wire fade drag state

Merges the fades/crossfade engine branch in, adds PlaybackSession
wrappers (fade_in_of/set_fade_in/fade_out_of/set_fade_out/crossfade)
and the FadeDrag gesture plumbing on the root (start/move/commit),
ahead of the drawing and keymap work.
✨ feat(engine): per-clip audio fades and adjacency crossfade (edith 18)Ahmet Kaan Gümüş · 4e4ec16
✨ feat(engine): per-clip audio fades and adjacency crossfade (edith 18)

# Conflicts:
#	crates/engine/src/export.rs
✨ feat(engine): per-clip audio fades, adjacency crossfade, and edith 18Ahmet Kaan Gümüş · 6d0747c
✨ feat(engine): per-clip audio fades, adjacency crossfade, and edith 18

Clip carries fade_in/fade_out, an equal-power gain envelope mixed into
playback and export, a crossfade() op that sets both edges of two
adjacent audio clips, and split's rule that only the kept edge keeps its
fade. The project file format bumps to edith 18 to carry the two new
fields; a v17 (or older) file loads with every clip's fades at zero.

Fixes a stray fade_in/fade_out struct-literal fragment left outside any
Clip literal in Player::trimmed (crates/app/src/player/timeline_edit.rs),
which was a syntax error breaking the whole app crate's build.

Adds unit coverage for Fade::gain_at's boundary/midpoint curve, the
split edge rule, crossfade's adjacency refusal, the Clip size-lock
test (40 -> 48 bytes), and a v17-loads-zero-fades / v18-round-trips
edith.rs test.
✨ feat(app): the timeline can redo, mirroring undoAhmet Kaan Gümüş · 49a1af3
✨ feat(app): the timeline can redo, mirroring undo

Project grows a redo stack: undo pushes the lanes it leaves onto it,
redo pops one back, and any fresh edit (snapshot) clears it since the
branch undo left behind is no longer where the edit leads. Wired
through PlaybackSession::redo, Player::redo and ActionId::Redo,
bound to ctrl+y -- bare "y" is already SubtitleStyle's, so redo takes
only the ctrl chord.
✨ feat(engine): a project can name its own sample rateAhmet Kaan Gümüş · 31981de
✨ feat(engine): a project can name its own sample rate

.edith goes to v17 with an optional samplerate line; the session carries
it, save/load round-trip it, and the one audio-open seam every consumer
shares (open_multi_streams_speed_at) conforms all segments to the named
rate — playback rebuild and both export encoders inherit it for free.
Proxies keep their film's own rate. A v16 file loads with the rate
unset, meaning derived-from-source as before.
✨ feat(engine): a library preview opens the row's own audio streamAhmet Kaan Gümüş · e6a2fc1
✨ feat(engine): a library preview opens the row's own audio stream

PlaybackSession::open_with_audio_stream binds a chosen audio track
instead of always the file's first, closing the corner-cut open_preview
named. Library rows already carry their own stream index (one row per
audio track on a remux), so the preview button now passes it straight
through.
✨ feat(app): resolution and rate are choosable before any file opensAhmet Kaan Gümüş · dc9a2c2
✨ feat(app): resolution and rate are choosable before any file opens

A pick made on an empty player waits in pending_settings and lands on
the next session the moment it is built, the same way a saved project's
own numbers do. The inspector rows and the Resolution keystroke work
with nothing open; a .edith's saved settings still win over a stale
pre-import pick. Engine test proves a later import never touches an
explicit resolution or rate.
🐛 fix(engine): the late-drop escape valve survives the speed skipAhmet Kaan Gümüş · 43ff2f2
🐛 fix(engine): the late-drop escape valve survives the speed skip

run() and run_hw() checked abort.late(due) && skipped < LATE_RUN as one
condition, so once LATE_RUN pictures in a row had been dropped for
lateness, the branch fell through to skip_for_speed -- and if that also
said skip (which it does on every other frame at >1x), the escape valve
that is supposed to guarantee one picture in LATE_RUN reaches the screen
never fired. A machine falling behind at speed could go fully silent.

Reordered so lateness is decided first and completely: still-within-run
skips for being late, past-run sends unconditionally (skipped=0), and
skip_for_speed only gets a say once lateness has already said "send".

Measured with a throwaway probe (deleted) against two real files, SW
decode (this box has no HW decode path), 15s per run, same machine
before/after:

  a large 4K H.264 mp4 (the falling-behind, worst-case class the
  escape valve exists for):
    1.0x  219->322 shown,  5->2 resyncs,  p99  1131.8ms->75.8ms
    1.5x  173->165 shown,  7->7 resyncs,  p99  1049.6ms->1113.4ms (noise)
    2.0x  134->141 shown,  7->7 resyncs,  p99  1055.7ms->970.6ms

  a small screen-recording mp4 (keeps up, never hits abort.late): 0
  resyncs before and after at all three speeds, numbers unchanged --
  the reorder does not touch a file that was never late.

Net: better or a wash everywhere measured, no regression on the class
the bug actually bites.

Adds a deterministic unit test for skip_for_speed's alternation at 2x
and its never-skip guarantee on a span's last frame.