No description or website provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
minimp3-sys
src
.gitignore
.gitmodules
.travis.yml
Cargo.lock
Cargo.toml
README.md

README.md

minimp3 Rust bindings

Cargo package Cargo package Build Status

Usage example

# Cargo.toml

[dependencies]
minimp3 = "0.3"
extern crate minimp3;

use minimp3::{Decoder, Frame};

use std::error::Error;
use std::fs::File;

fn main() -> Result<(), Box<Error>> {
    let mut decoder = Decoder::new(File::open("audio_file.mp3")?);

    loop {
        // Keep decoding frames until EOF is reached
        let Frame { data, sample_rate, channels, .. } = decoder.next_frame()?;
    }

    unreachable!()
}