mpg123

Crates.iompg123
lib.rsmpg123
version0.1.2
sourcesrc
created_at2019-04-05 02:03:37.86481
updated_at2019-04-09 20:48:14.116484
descriptionAn opinionated wrapper for mpg123-sys
homepage
repositoryhttps://github.com/kisasexypantera94/mpg123-rs
max_upload_size
id125905
size7,604
David Grinberg (kisasexypantera94)

documentation

README

mpg123-rs

Latest Version

About

An opinionated wrapper for mpg123-sys.

Usage

let decoder = Decoder::new("assets/a-Ha - Take On Me.mp3", None).unwrap();
println!("{:?}", decoder.format());
let mut samples = Vec::new();

loop {
    let mut buf = vec![0; 2048];
    match decoder.read(&mut buf) {
        Ok(()) => {
            for x in buf.into_iter() {
                samples.push(x);
            }
        }
        Err(Error::EOF) => break,
        Err(e) => panic!(e),
    }
}

Other examples can be found here.

Commit count: 10

cargo fmt