1
2
Fork
You've already forked common
0
A collection of tools for working with raw PCM samples, including source/sink mechanics for desired encoding, channel mixing, interleaving, sample conversion, and other DSP effects.
  • Zig 100%
Find a file
2026年07月06日 02:12:35 -04:00
src implemented peekBits for BitReader 2026年07月06日 02:12:35 -04:00
.gitignore added root file and build scripts 2026年06月27日 18:14:28 -04:00
build.zig removed temp test app 2026年06月28日 18:18:47 -04:00
build.zig.zon forgot to change fingerprint after rename. oops. 2026年06月28日 18:46:35 -04:00
CHANGELOG.md implemented peekBits for BitReader 2026年07月06日 02:12:35 -04:00
LICENSE added LICENSE and README 2026年06月27日 19:14:05 -04:00
README.md fixed typo and added utility functions section 2026年07月02日 18:55:11 -04:00

common

Provides basic types and functionality that is shared across the audiophile ecosystem. This repository exists for the sole purpose of eliminating code duplication.

Types

  • SeekImpl - Optional type for users to provide in order to enable support for seeking.
  • ChannelLayout - Enumeration describing the common 1-8 channel layouts and how they map to physical speakers.
  • BitReader - Provides a wrapper over std.Io.Reader for reading at the bit granularity.

Namespaces

  • pcm - Provides a collection of tooling for reading, writing, and transforming raw PCM samples, which can be chained together in linear pipeline of buffers without allocation, and leveraging SIMD wherever it is prudent to do so.

    • endian-aware reading of generic raw samples from a std.Io.Reader
    • endian-aware writing of generic raw samples to a std.Io.Writer
    • interleave/deinterleave
    • sample conversion (i.e. signed 16-bit to 32-bit float, etc)
    • channel mixing (upscale/downscale to more/less channels)

    Utility Functions

  • frameToDuration - Convert a frame offset to a std.Io.Duration.

  • durationToFrame - Convert a std.Io.Duration to a frame offset.