Wɔakyerɛw release ho nsɛm no wɔ Borɔfo kasa mu.
WebCodecs and a real FLAC decoder: the engine decodes audio on its own
Two genuinely new media capabilities, both page-observable and both proven bit-exact. First, WebCodecs - the low-level codec API real apps use to move coded chunks and raw frames around without a video element: EncodedAudioChunk, EncodedVideoChunk, AudioData and VideoFrame are here with real buffer and plane arithmetic (RGBA, BGRA, I420, I422, I444 and NV12 plane layouts; planar and interleaved audio with sample-format conversion), and AudioDecoder genuinely decodes the codecs a browser can decode without a licence or a heavy library - linear PCM in every sample type and ITU-T G.711 companding - emitting real AudioData on its output callback, with an LPCM AudioEncoder inverse so encode and decode round-trip exactly. VideoDecoder and VideoEncoder report an honest isConfigSupported (there is no pure-Rust video decoder yet, so every video codec answers false) and run the real configure and close lifecycle. Second, a from-scratch FLAC decoder - lossless, so its output is deterministic and bit-exact by construction - now backs AudioContext.decodeAudioData alongside a WAV reader, so a page can decode a complete FLAC or WAV file to an AudioBuffer entirely on the engine. Both were verified against ffmpeg's reference decode to the sample. Media moves 41 to 45; the overall holds at 57.
Deɛ asesa
nsesaeɛ 3- MediaWebCodecs data objects with real buffer arithmetic: EncodedAudioChunk / EncodedVideoChunk (type, timestamp, duration, copyTo), AudioData (planar and interleaved layout, allocationSize and copyTo with sample-format conversion through the spec's normalized pivot; same-format copies stay bit-exact), and VideoFrame (RGBA/BGRA/RGBX/BGRX/I420/I420A/I422/I444/NV12 plane layouts, allocationSize, copyTo returning per-plane offset and stride, clone, close).
- MediaAudioDecoder that genuinely decodes: linear PCM (pcm-u8/s16/s32/f32) and ITU-T G.711 (ulaw/alaw) chunks become real AudioData delivered on the output callback, with an LPCM AudioEncoder inverse so encode->decode is bit-exact; VideoDecoder/VideoEncoder register with an honest isConfigSupported (no pure-Rust video decoder yet, so every video codec answers false) and the real configure/close lifecycle.
- MediaA pure-Rust, unsafe-free FLAC decoder (FIXED and LPC subframes, Rice residuals, left/right/mid-side stereo decorrelation) wired into AudioContext.decodeAudioData alongside a WAV reader (8/16/24/32-bit PCM and 32-bit float), so a page decodes a complete FLAC or WAV file to an AudioBuffer on the engine - verified bit-exact against ffmpeg's reference decode.


