riff-wave-core 0.1.1

Sans-IO RIFF/WAVE (PCM) mux and demux
Documentation
  • Coverage
  • 100%
    16 out of 16 items documented0 out of 0 items with examples
  • Size
  • Source code size: 29.02 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 521.76 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • nyxways/mediaway
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • dev-nyxie

riff-wave-core

Status: early development (0.x). Not recommended for production; public APIs may change without notice. Part of the Mediaway media stack.

Sans-IO RIFF/WAVE mux and demux for PCM audio (integer and IEEE float). Mux buffers pushed samples and writes a complete .wav on finish() (RIFF chunk sizes must be known up front); demux parses a complete buffer back into a format description and raw samples. No I/O in the core.

Quick start

use riff_wave_core::{Muxer, parse, SampleFormat, WaveFormat};

let format = WaveFormat {
    sample_format: SampleFormat::Pcm,
    channels: 2,
    sample_rate: 48_000,
    bits_per_sample: 16,
};

let mut muxer = Muxer::new(format);
muxer.push_samples(&pcm_bytes);
let wav = muxer.finish(); // complete RIFF/WAVE file

// Parse it back: format description + raw sample payload.
let (parsed, samples) = parse(&wav)?;
assert_eq!(parsed.sample_rate, 48_000);

Status

Status marks: ✅ first-class (tests for claimed scope) · ⚡ Zero-Copy path (no payload copy; implies ✅) · 🆗 best-effort / prototype · 🛠️ planned · ❌ attempted and genuinely blocked · 👻 not exercisable yet (no hardware / device / session available)

Area Status Notes
Mux (PCM integer + IEEE float, fmt /data chunks)
Demux (parse, skips unknown chunks like LIST/fact) Complete-buffer API (not incremental)
WAVE_FORMAT_EXTENSIBLE (multichannel masks) 🛠️
Compressed WAV payloads (ADPCM, µ-law/A-law, MP3-in-WAV) 🛠️ Needs a per-format decode step outside container scope
RF64 / W64 (> 4 GiB files) 🛠️ Classic 32-bit RIFF size field only

Docs

Contributing

Contributions are welcome — open an issue or pull request at github.com/nyxways/mediaway.

License

MIT OR Apache-2.0.