|
FastLED 3.10.6
|
|
static |
Metadata carried by an MP3's first frame when an encoder wrote a Xing, Info, or VBRI header there.
Such a frame is not audio. It occupies a complete, valid MPEG frame, so a decoder that only scans for sync words will happily decode it and emit a frame of noise before the music starts. LAME additionally records how many samples of encoder priming precede the real signal, and how many samples of padding follow it; ignoring those leaves the priming audible at the start.
Measured on the l3-nonstandard-sin1k0db_lame_vbrtag conformance vector, the total to drop is 2257 samples per channel, which decomposes exactly:
1152 the tag frame itself, emitted as audio 576 LAME's recorded encoder delay for that file 529 MP3D_DECODER_DELAY, the format's own synthesis delay ---- 2257
Skipping them moves that vector from 2.85 dB to 108.18 dB against its reference (FastLED#4129). The 529 is not in the file: it is a property of the MPEG synthesis filterbank, and every gapless-capable player adds it to whatever the encoder recorded. The synthesis filterbank's own latency, in samples per channel. Constant for MPEG Layer III and not recorded in the stream, so it has to be added to the encoder's reported delay to get the true offset of the first real sample.
Definition at line 35 of file mp3_vbr_tag.h.
Referenced by fl::third_party::Mp3StreamDecoderImpl::findAndDecodeFrame().