Commits
2026-08-20
fix(aac-sbr-ogg): flush the terminal Vorbis block through to Ogg's granule-stated endAhmet Kaan Gümüş · b966d5e
fix(aac-sbr-ogg): flush the terminal Vorbis block through to Ogg's granule-stated end EOS was never signalled through ec-probe/the symphonia shim, so the last Vorbis block's un-overlapped tail (and any un-overlapped audio still sitting in the last decoded packet) never reached the caller: the reader now hands every audio track one synthetic, empty terminal packet once the container itself is exhausted, and AudioDecoder::flush() is what answers it. Trimming to the container's own granule only ever trusts two points: the very first packet's granule (a real front pre-roll, if the format has one) and the last one, applied once at flush -- an interior page's granule marks where the packet finishing on that page ends, not a ceiling every later page's cumulative output must stay under, so it is never used as one. Vorbis's last decoded packet is held back one call rather than handed out immediately, so that final trim can still reach into it.
2026-08-14
fix(probe): the head of a file is exact, and a default track is the flagged oneAhmet Kaan Gümüş · c665d19
fix(probe): the head of a file is exact, and a default track is the flagged one Three gaps the symphonia swap (edith W7) found, all at the start of a file or at the pick of a track: - **An MP3 is gapless.** The LAME tag's encoder delay and padding went unread, so a `.mp3` claimed the silence around its sound as part of it and its samples arrived 25 ms behind the `.flac` of the same tone. `StreamInfo::initial_padding` now states the delay (the tag's, plus Layer III's own 529 samples of synthesis delay) and the duration ends at the last audible sample. Measured against ffmpeg on eight fixtures and three files of a real library: lag 0, correlation 1.0000, where the mp3 was 1105 samples late before. - **A seek to the beginning goes there.** `candidate` started at the nearest *cue*, and a cue naming another track can sit past our own first block: this muxer opens a cluster at every video keyframe and cues the video alone, so a file whose first cluster holds only sound lost that cluster on every seek to zero. Another track's cue now backs off one entry, and a target before everything indexed starts at the first cluster. - **`FlagDefault` picks the track.** `default_stream` answered with the first stream of a kind, so a dual-audio remux that marked its second track default opened in the other language. `StreamInfo::default` carries the flag where a file really wrote it (the element's absent value is 1, which is why "flagged" and "eligible" have to be different questions), and the symphonia shim's `default_track` reads it. The shim gains the surface that carries these: `Track::delay`, the umbrella's feature names (no-ops -- ec-probe serves every format unconditionally -- but a `[patch.crates-io]` consumer naming `features = ["mkv"]` must still resolve). Checks: `ec_probe` `the_head_of_a_file_is_exact` (gapless arithmetic exact against ffmpeg, and no seek lands past a first packet) and `ec_matroska` `the_first_cluster_is_reachable_when_no_cue_names_it` (fails without the cue back-off: the audio restarts at 21 ms instead of 0).
feat(shims): symphonia, symphonia-core and symphonia-codec-aac over ec-probeAhmet Kaan Gümüş · 32195c9
feat(shims): symphonia, symphonia-core and symphonia-codec-aac over ec-probe Exactly the surface edith consumes (audio.rs:36-53 and its call sites): the probe and codec registries, the format reader and audio decoder traits, tracks, packets, units and the AAC decoder seat. Written from those call shapes and the crates' published documentation; no symphonia source was read (MPL-2.0 incumbent, MIT OR Apache-2.0 family). Two incumbent defects are gone rather than worked around, and each has a test: a Matroska seek is reliable more than once per reader (edith opens a new reader per attempt because the incumbent's is not), and a multichannel AAC track decodes instead of 'aac: aac too complex'. The shim test drives every call edith makes, in the shape edith makes it, over nine fixtures.