The decoders / encoders are libraries, not the file format: audio/opus/{Celt, CeltTables, CeltEncoder, Mdct, Packet,
Silk, SilkTables, Decoder} -> codecs/audio/Opus; audio/vorbis/{Codebook, Packet, Setup, Tables} ->
codecs/audio/Vorbis; audio/flac/{Frame, Encode} -> codecs/audio/Flac; audio/mp3/{Core, Tables, Header, Encode2,
Encode3, EncTables, Analysis} -> codecs/audio/Mpa (tools/move.py; code unchanged). Each gets an index init.luau.
The format folders keep the file mapping: Ogg Opus / Ogg Vorbis (headers, granules, seeking, the Vorbis encoder's
Ogg writer), native / Ogg FLAC streams and metadata, ID3 / Xing / the MP3 frame index. docs: STYLE says a codec is
not the format. Full suite: 248 runs pass on both runtimes, lint green.
12 lines
524 B
Luau
12 lines
524 B
Luau
--!strict
|
|
-- codecs/audio/Flac: FLAC frames without the container: frame header parsing, subframe decoding (constant, verbatim,
|
|
-- fixed, LPC, Rice residuals, stereo decorrelation) with CRC-8 / CRC-16 (Frame), and the frame encoder (Encode).
|
|
-- Absorbed from flac-luau 7083d0d (same author); the encoder is new. Native FLAC / Ogg FLAC streams, metadata and
|
|
-- seeking are audio/flac.
|
|
local Flac = {
|
|
Frame = require("@formats/codecs/audio/Flac/Frame"),
|
|
Encode = require("@formats/codecs/audio/Flac/Encode"),
|
|
}
|
|
|
|
return Flac
|