Skip to main content

Crate rff_codec_flac

Crate rff_codec_flac 

Source
Expand description

FLAC codec adapter over our in-house rusty_flac (pure Rust, no FFI): lossless encoder + decoder, both ours end to end.

The decoder takes two packet shapes:

  • One FLAC frame per packet (what the FLAC and Matroska demuxers emit): configure must supply the stream’s STREAMINFO via extradata (fLaC + metadata blocks, or the bare 34-byte block). Each packet decodes to one AudioFrame.
  • A whole .flac stream (starting fLaC, as the encoder emits it), which decodes to one AudioFrame and needs no configuration.

Either way samples come out interleaved: native s16 for <=16-bit streams, f32 normalized from the native depth for wider ones.

Functions§

register
Register the FLAC codec into a CodecRegistry.