/** * MP3 decoder. * * Walks the frame sequence, assembles main data through the bit reservoir, and * runs each granule through the full Layer III chain: * * ``` * side info -> scalefactors -> Huffman -> requantize -> reorder * -> stereo -> alias reduction -> IMDCT -> frequency inversion * -> polyphase synthesis -> PCM * ``` * * ## Gapless playback * * An MP3 never contains exactly the audio that went in. The encoder's * filterbank needs priming, so it prepends silence, and it pads the final frame * out to a whole 1152 samples. LAME records both figures in a tag, and honouring * them is the difference between a seamless album and a click between every * track. When the tag is present those samples are trimmed; when it is absent a * conservative default delay is used. */ import type { DecodeOptions } from '../types.js'; import type { DecodedContainer } from '../formats/types.js'; export interface Mp3DecodeOptions extends DecodeOptions { /** * Honour the encoder delay and padding for gapless playback. Defaults to * `true`. Turn it off when you need the decoded stream to line up * sample-for-sample with another decoder that ignores the tag. */ gapless?: boolean; } /** Decodes an MP3 stream. */ export declare function decodeMp3(input: Uint8Array, options?: Mp3DecodeOptions): DecodedContainer; //# sourceMappingURL=decoder.d.ts.map