Popularity
1.4
Stable
Activity
3.5
-
19
2
6

Monthly Downloads: 5,866
Programming language: Rust
License: MIT License
Tags: Media     Audio     RustAudio     Decoder     Mp3     Mpeg    
Latest version: v0.3.3

minimp3-rs alternatives and similar packages

Based on the "RustAudio" category

Do you think we are missing an alternative of minimp3-rs or a related project?

Add another 'RustAudio' Package

README

[minimp3](//github.com/lieff/minimp3) Rust bindings

Cargo package Cargo package Build Status

Usage example

# Cargo.toml

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

use minimp3::{Decoder, Frame, Error};

use std::fs::File;

fn main() {
    let mut decoder = Decoder::new(File::open("audio_file.mp3").unwrap());

    loop {
        match decoder.next_frame() {
            Ok(Frame { data, sample_rate, channels, .. }) => {
                println!("Decoded {} samples", data.len() / channels)
            },
            Err(Error::Eof) => break,
            Err(e) => panic!("{:?}", e),
        }
    }
}