Crate flac [−] [src]
An implementation of FLAC, free lossless audio codec, written in Rust.
The code is available on GitHub.
Examples
Basic decoding from a file.
use flac::StreamReader; use std::fs::File; match StreamReader::<File>::from_file("path/to/file.flac") { Ok(mut stream) => { // Copy of `StreamInfo` to help convert to a different audio format. let info = stream.info(); for sample in stream.iter() { // Iterate over each decoded sample } } Err(error) => println!("{}", error), }
Reexports
pub use stream::{Stream, StreamBuffer, StreamReader}; |
Modules
metadata |
Provides an interface for dealing with FLAC metadata blocks. |
stream |
Structs
ByteStream |
Structure that hold a slice of bytes. |
Metadata |
Data associated with a single metadata block. |
ReadStream |
Structure that hold a reader for a source of bytes. |
Traits
StreamProducer |
An interface for parsing through some type of producer to a byte stream. |