edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB5591c0eTahinli3 months ago1014 commits
| 1 | //! `ruopus` as edith consumes it, over [`ec_opus`]. |
| 2 | //! |
| 3 | //! A shim, not a port: it carries the incumbent's package name and version so |
| 4 | //! the swap is a `[patch.crates-io]` line, and it exposes exactly the one item |
| 5 | //! the replica names — [`MultistreamDecoder`], built with `with_rate` and fed |
| 6 | //! one packet at a time with `decode_packet` (`audio.rs:1575`, `1694`; |
| 7 | //! `export.rs:1950`, the fidelity gate's own decoder). |
| 8 | //! |
| 9 | //! A re-export is the whole adapter, and that is a claim about two things |
| 10 | //! rather than about the names: |
| 11 | //! |
| 12 | //! * **Layout arguments.** `with_rate(rate, streams, coupled, &mapping)` means |
| 13 | //! the same thing in both: the first `coupled` elementary streams are stereo, |
| 14 | //! `mapping[c]` names the decoded channel output channel `c` reads (255 = |
| 15 | //! silent), and an impossible layout panics rather than returning — which is |
| 16 | //! why the replica checks the `OpusHead` it read from a file before it gets |
| 17 | //! here (`audio.rs:opus_layout`). |
| 18 | //! * **Channel order.** Both decoders emit the *mapping's* order, which for RFC |
| 19 | //! 7845 family 1 is Vorbis order (FL, FC, FR, BL, BR, LFE for 5.1) and not |
| 20 | //! the product's FL/FR/FC/LFE/BL/BR. The permutation stays where the |
| 21 | //! incumbent's behaviour already put it, at the call site |
| 22 | //! (`audio.rs:vorbis_to_film_order`); a shim that permuted here would fold |
| 23 | //! surround twice. |
| 24 | //! |
| 25 | //! Errors differ in type and not in use: `ec_core::Error` where the incumbent |
| 26 | //! had `PacketError`, both `Display` and both consumed as `{e}` or as a |
| 27 | //! refused packet. |
| 28 | |
| 29 | |
| 30 | |
| 31 | pub use MultistreamDecoder; |