mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-24 03:21:34 +01:00
A `data` chunk of size 0 counted as empty only when the RIFF size matched the file. A writer that appends a `LIST` chunk after writing the RIFF size leaves it stale, so the reader took the file for an unfinished recording and decoded the `LIST` chunk's bytes as samples (8 frames of noise instead of none). A size-0 `data` chunk is now also empty when whole chunks follow it and the first one has an id that follows audio (LIST, bext, cue, JUNK, ...). A recording that was never finalised (PCM after the header) and bytes that only start like a chunk still decode as audio.