#wave #sound #library #rkpi

rkpi2

An implementation of the RKPI2 format

2 releases

0.1.2 May 16, 2020
0.1.0 May 15, 2020

#43 in #wave

ISC license

8KB
114 lines

Pure Rust implementation of the RKPI2 audio format. This format is aimed to replace WAVE with a simple to parse an minimal header strutcture, ability to easily parse and optional compression with Zstd.

This can both mux and demux the header data, from file objects and has a simple interface.

Example

use std::io::Cursor;

fn main() {
    let out = Cursor::new(Vec::new());
    let mut rkout = mux(Box::new(out),
        Hdr {
            format: Fmt::Int8,
            rate: 8000,
            channels: 1
        }, None).unwrap();
    rkout.write_all(vec![0u8; 8000].as_slice()).unwrap();
}

Dependencies

~3MB
~57K SLoC