shravan
shravan (Sanskrit: hearing / perception) -- Audio codecs for the AGNOS ecosystem.
WAV and FLAC decoding/encoding, PCM sample format conversion, sinc resampling, and audio metadata tag reading. Zero dependencies on C libraries. Pure Rust with no_std support.
Features
| Feature | Default | Description |
|---|---|---|
std |
yes | Standard library support |
wav |
yes | WAV encode/decode |
flac |
yes | FLAC decode |
pcm |
yes | PCM format conversions |
resample |
no | Windowed sinc resampler |
tag |
no | ID3v2 / Vorbis Comment tag reading |
logging |
no | tracing instrumentation |
Quick start
use open;
use wav;
use PcmFormat;
// Encode samples as WAV
let samples = vec!;
let wav_bytes = encode.unwrap;
// Auto-detect and decode
let = open.unwrap;
assert_eq!;
Modules
wav-- RIFF WAVE encoder/decoder supporting PCM 8/16/24/32-bit and IEEE float 32-bitflac-- FLAC decoder with Constant, Verbatim, and Fixed subframes, Rice coding, channel decorrelationpcm-- Sample format conversion (i8/i16/i24/i32/f32/f64), interleave/deinterleaveresample-- Windowed sinc interpolation with Draft/Good/Best quality levelstag-- ID3v2 and Vorbis Comment metadata tag readingcodec-- Unified auto-detect interface
License
GPL-3.0-only