Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • R riffler
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
    • Model experiments
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Teknikal_Domain
  • riffler
  • Wiki
  • Basic Format Overview

Basic Format Overview · Changes

Page history
Rename to Basic Format Overview authored Mar 26, 2023 by Teknikal_Domain's avatar Teknikal_Domain
Hide whitespace changes
Inline Side-by-side
Basic-Format-Overview.md 0 → 100644
View page @ ce3e4b4a
RIFF (Resource Interchange File Format) is basically the audio[^2] equivalent of a PNG - split your file into "chunks"[^1] that have a name, and give them a tiny header, and a data blob.
We're concerned with wave (`.wav`) files here, so for those you'll see:
- The file header of `RIFF` introducing a [`RIFF`](/chunks/RIFF) chunk
- The `WAVE` sub-chunk immediately after indicating this is a wave file
- A `fmt ` (note the space) chunk indication how the data is stored
- A `data` chunk with the actual sample data
Since I made this to deal with markers in BWF (Broadcast Wave Format) files, there's two others:
- After `WAVE` is `bext` (**b**roadcast **ext**ensions)
- After `data` is `cue ` and then a `LIST` of `adtl` chunks.
Each chunk, broadly, follows the pattern of a 4-byte (ASCII) chunk name / ID, followed by a 4 byte length (little-endian), not counting the header. Because of this, you can easily build an index of chunks in the file by reading the 4-byte ID, the 4-byte length, skipping that length, and repeating the process, storing the read ID with the byte offset it was at.
[^1]: I'm not kidding, both the PNG and (R)IFF spec call the individual, named data segments, "chunks."
[^2]: Video too I guess, since AVI files are based on RIFF.
\ No newline at end of file
Clone repository
  • Basic Format Overview
  • chunks
    • RIFF
    • fmt
  • Home