forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on 8c7bf808ae19e1655737ac07a94de22b5002565fFiltered to crates/engine/src/ao.rsClear filter

2026-08-10

🔊 feat(audio): volume and mute for the monitoring outputAhmet Kaan Gümüş · bb07bdc
🔊 feat(audio): volume and mute for the monitoring output

One knob down the stack: `ao_set_volume(handle, gain)` scales the samples
in the RT callback, and mute is a gain of 0.0. Not the stream's PipeWire
volume control -- WirePlumber persists every Props change into its restore
state (measured on this box: the bucket gains `mute:true` ~2 s later), so
a mute keypress would have become "edith has no sound" in tomorrow's
system mixer, which is the bug 9ab4ebd just finished removing.

Volume and mute stay independent: turning the level down while muted must
not be what makes sound come out. The button says both at once.

Mute is not pause -- the frames are still consumed, so the device clock,
and with it the picture, runs straight through.

The keybindings card's row list now scrolls inside a cap, which is the
upgrade path its own ponytail named: three more actions no longer fit a
360 px window, and now no number of them can stop fitting.

2026-08-09

✨ feat(engine): seek primitives — video open_at, ao_flush, audio open_atAhmet Kaan Gümüş · 96ae365
✨ feat(engine): seek primitives — video open_at, ao_flush, audio open_at

Lane 1 of the seek slice; PlaybackSession orchestration comes next.

- demux/decode: stss sync lookup, DecodeSession::open_at decodes from
  the keyframe and discards to the target; Frame.index stays absolute.
  HW plugin ABI: vh_open renamed vh_open_at(path, target) — discards
  skip the vaGetImage readback; measured seek cost 65ms HW / 222ms SW
- engine-audio: ao_flush drains the ring consumer-side in the RT
  callback (one-shot atomic), stale PCM unplayable even when paused;
  played-position atomics untouched so clock math survives
- audio: open_at walks stts, 2-packet AAC pre-roll (MDCT overlap
  reconstructed exactly — verified 0-diff before the first PNS band),
  sample-exact trim; priming skip and seek discard unified. AAC seek
  is deliberately not bit-exact: symphonia's PNS noise LCG state
  depends on packet history; bounded <1e-3 by test instead
✨ feat(engine): audio decode, PipeWire output plugin, playback clockAhmet Kaan Gümüş · 229a569
✨ feat(engine): audio decode, PipeWire output plugin, playback clock

Wave 1 of the audio slice — three independent modules, app wiring
comes next:

- audio.rs: AAC-LC via standalone symphonia AacDecoder over the
  existing mp4 demuxer; priming trim read from the container elst
  (verified against ffprobe); channel identity pinned by
  zero-crossing tests on the 440/880 Hz fixture
- engine-audio: dlopen'd PipeWire cdylib (ao_* C ABI). App binary
  keeps zero libpipewire linkage; daemon absent fails open() in ~1ms.
  Fill capped at 1024 frames/callback: uncapped, PipeWire hands the
  sink-sized buffer and the position clock steps 256ms at a time.
  Stream time rate is 1/48000 regardless of stream rate — position
  is rescaled or the clock runs 8.8% fast on 44.1k content
- clock.rs: PlaybackClock, audio-driven with wall fallback; audio
  positions relative to last re-anchor so restarted streams re-sync;
  paused == frozen exactly, all re-anchoring through one path